mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-06 19:45:20 +01:00
chore(code-update):added latest version of api+cli
APIs have additional files thanks to the build-script requirement. CLI has just seen minor changes though, making it usable with a stable compiler.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
// DO NOT EDIT !
|
||||
// This file was generated automatically from 'src/mako/cli/main.rs.mako'
|
||||
// DO NOT EDIT !
|
||||
#![feature(plugin, exit_status)]
|
||||
#![allow(unused_variables, unused_imports, dead_code, unused_mut)]
|
||||
|
||||
#[macro_use]
|
||||
@@ -22,7 +21,7 @@ mod cmn;
|
||||
|
||||
use cmn::{InvalidOptionsError, CLIError, JsonTokenStorage, arg_from_str, writer_from_opts, parse_kv_arg,
|
||||
input_file_from_opts, input_mime_from_opts, FieldCursor, FieldError, CallType, UploadProtocol,
|
||||
calltype_from_str, remove_json_null_values};
|
||||
calltype_from_str, remove_json_null_values, ComplexType, JsonType, JsonTypeInfo};
|
||||
|
||||
use std::default::Default;
|
||||
use std::str::FromStr;
|
||||
@@ -94,7 +93,7 @@ impl<'n, 'a> Engine<'n, 'a> {
|
||||
Ok((mut response, output_schema)) => {
|
||||
let mut value = json::value::to_value(&output_schema);
|
||||
remove_json_null_values(&mut value);
|
||||
serde::json::to_writer_pretty(&mut ostream, &value).unwrap();
|
||||
json::to_writer_pretty(&mut ostream, &value).unwrap();
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -197,6 +196,7 @@ impl<'n, 'a> Engine<'n, 'a> {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let mut exit_status = 0i32;
|
||||
let upload_value_names = ["mode", "file"];
|
||||
let arg_data = [
|
||||
("archive", "methods: 'insert'", vec![
|
||||
@@ -234,7 +234,7 @@ fn main() {
|
||||
|
||||
let mut app = App::new("groupsmigration1")
|
||||
.author("Sebastian Thiel <byronimo@gmail.com>")
|
||||
.version("0.2.0+20140416")
|
||||
.version("0.3.0+20140416")
|
||||
.about("Groups Migration Api.")
|
||||
.after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_groupsmigration1_cli")
|
||||
.arg(Arg::with_name("url")
|
||||
@@ -275,7 +275,8 @@ fn main() {
|
||||
(_ , &Some(f)) => f,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
let mut arg = Arg::with_name(arg_name_str);
|
||||
let mut arg = Arg::with_name(arg_name_str)
|
||||
.empty_values(false);
|
||||
if let &Some(short_flag) = flag {
|
||||
arg = arg.short(short_flag);
|
||||
}
|
||||
@@ -314,12 +315,12 @@ fn main() {
|
||||
let debug = matches.is_present("debug");
|
||||
match Engine::new(matches) {
|
||||
Err(err) => {
|
||||
env::set_exit_status(err.exit_code);
|
||||
exit_status = err.exit_code;
|
||||
writeln!(io::stderr(), "{}", err).ok();
|
||||
},
|
||||
Ok(engine) => {
|
||||
if let Err(doit_err) = engine.doit() {
|
||||
env::set_exit_status(1);
|
||||
exit_status = 1;
|
||||
match doit_err {
|
||||
DoitError::IoError(path, err) => {
|
||||
writeln!(io::stderr(), "Failed to open output file '{}': {}", path, err).ok();
|
||||
@@ -335,4 +336,6 @@ fn main() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::process::exit(exit_status);
|
||||
}
|
||||
Reference in New Issue
Block a user