mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
fix(version-up): code updated to v0.1.6, latest CLI
* also includes publishing tag files
This commit is contained in:
@@ -19,39 +19,40 @@ use std::io::{self, Write};
|
||||
|
||||
docopt!(Options derive Debug, "
|
||||
Usage:
|
||||
adexchangeseller2 [options] accounts adclients-list <account-id> [-p <v>]... [-o <out>]
|
||||
adexchangeseller2 [options] accounts alerts-list <account-id> [-p <v>]... [-o <out>]
|
||||
adexchangeseller2 [options] accounts customchannels-get <account-id> <ad-client-id> <custom-channel-id> [-p <v>]... [-o <out>]
|
||||
adexchangeseller2 [options] accounts customchannels-list <account-id> <ad-client-id> [-p <v>]... [-o <out>]
|
||||
adexchangeseller2 [options] accounts get <account-id> [-p <v>]... [-o <out>]
|
||||
adexchangeseller2 [options] accounts list [-p <v>]... [-o <out>]
|
||||
adexchangeseller2 [options] accounts metadata-dimensions-list <account-id> [-p <v>]... [-o <out>]
|
||||
adexchangeseller2 [options] accounts metadata-metrics-list <account-id> [-p <v>]... [-o <out>]
|
||||
adexchangeseller2 [options] accounts preferreddeals-get <account-id> <deal-id> [-p <v>]... [-o <out>]
|
||||
adexchangeseller2 [options] accounts preferreddeals-list <account-id> [-p <v>]... [-o <out>]
|
||||
adexchangeseller2 [options] accounts reports-generate <account-id> <start-date> <end-date> [-p <v>]... [-o <out>]
|
||||
adexchangeseller2 [options] accounts reports-saved-generate <account-id> <saved-report-id> [-p <v>]... [-o <out>]
|
||||
adexchangeseller2 [options] accounts reports-saved-list <account-id> [-p <v>]... [-o <out>]
|
||||
adexchangeseller2 [options] accounts urlchannels-list <account-id> <ad-client-id> [-p <v>]... [-o <out>]
|
||||
adexchangeseller2 [options] accounts adclients-list <account-id> [-p <v>...] [-o <out>]
|
||||
adexchangeseller2 [options] accounts alerts-list <account-id> [-p <v>...] [-o <out>]
|
||||
adexchangeseller2 [options] accounts customchannels-get <account-id> <ad-client-id> <custom-channel-id> [-p <v>...] [-o <out>]
|
||||
adexchangeseller2 [options] accounts customchannels-list <account-id> <ad-client-id> [-p <v>...] [-o <out>]
|
||||
adexchangeseller2 [options] accounts get <account-id> [-p <v>...] [-o <out>]
|
||||
adexchangeseller2 [options] accounts list [-p <v>...] [-o <out>]
|
||||
adexchangeseller2 [options] accounts metadata-dimensions-list <account-id> [-p <v>...] [-o <out>]
|
||||
adexchangeseller2 [options] accounts metadata-metrics-list <account-id> [-p <v>...] [-o <out>]
|
||||
adexchangeseller2 [options] accounts preferreddeals-get <account-id> <deal-id> [-p <v>...] [-o <out>]
|
||||
adexchangeseller2 [options] accounts preferreddeals-list <account-id> [-p <v>...] [-o <out>]
|
||||
adexchangeseller2 [options] accounts reports-generate <account-id> <start-date> <end-date> [-p <v>...] [-o <out>]
|
||||
adexchangeseller2 [options] accounts reports-saved-generate <account-id> <saved-report-id> [-p <v>...] [-o <out>]
|
||||
adexchangeseller2 [options] accounts reports-saved-list <account-id> [-p <v>...] [-o <out>]
|
||||
adexchangeseller2 [options] accounts urlchannels-list <account-id> <ad-client-id> [-p <v>...] [-o <out>]
|
||||
adexchangeseller2 --help
|
||||
|
||||
All documentation details can be found TODO: <URL to github.io docs here, see #51>
|
||||
All documentation details can be found at
|
||||
http://byron.github.io/google-apis-rs/google_adexchangeseller2_cli/index.html
|
||||
|
||||
Configuration:
|
||||
--scope <url>
|
||||
Specify the authentication a method should be executed in. Each scope requires
|
||||
the user to grant this application permission to use it.
|
||||
Specify the authentication a method should be executed in. Each scope
|
||||
requires the user to grant this application permission to use it.
|
||||
If unset, it defaults to the shortest scope url for a particular method.
|
||||
--config-dir <folder>
|
||||
A directory into which we will store our persistent data. Defaults to a user-writable
|
||||
directory that we will create during the first invocation.
|
||||
A directory into which we will store our persistent data. Defaults to
|
||||
a user-writable directory that we will create during the first invocation.
|
||||
[default: ~/.google-service-cli]
|
||||
--debug
|
||||
Output all server communication to standard error. `tx` and `rx` are placed into
|
||||
the same stream.
|
||||
Output all server communication to standard error. `tx` and `rx` are placed
|
||||
into the same stream.
|
||||
--debug-auth
|
||||
Output all communication related to authentication to standard error. `tx` and `rx` are placed into
|
||||
the same stream.
|
||||
Output all communication related to authentication to standard error. `tx`
|
||||
and `rx` are placed into the same stream.
|
||||
");
|
||||
|
||||
mod cmn;
|
||||
@@ -106,6 +107,9 @@ impl Engine {
|
||||
None
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
if self.opt.flag_scope.len() > 0 {
|
||||
call = call.add_scope(&self.opt.flag_scope);
|
||||
}
|
||||
let mut ostream = writer_from_opts(self.opt.flag_o, &self.opt.arg_out);
|
||||
match match protocol {
|
||||
"standard-request" => call.doit(),
|
||||
@@ -152,6 +156,9 @@ impl Engine {
|
||||
None
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
if self.opt.flag_scope.len() > 0 {
|
||||
call = call.add_scope(&self.opt.flag_scope);
|
||||
}
|
||||
let mut ostream = writer_from_opts(self.opt.flag_o, &self.opt.arg_out);
|
||||
match match protocol {
|
||||
"standard-request" => call.doit(),
|
||||
@@ -195,6 +202,9 @@ impl Engine {
|
||||
None
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
if self.opt.flag_scope.len() > 0 {
|
||||
call = call.add_scope(&self.opt.flag_scope);
|
||||
}
|
||||
let mut ostream = writer_from_opts(self.opt.flag_o, &self.opt.arg_out);
|
||||
match match protocol {
|
||||
"standard-request" => call.doit(),
|
||||
@@ -244,6 +254,9 @@ impl Engine {
|
||||
None
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
if self.opt.flag_scope.len() > 0 {
|
||||
call = call.add_scope(&self.opt.flag_scope);
|
||||
}
|
||||
let mut ostream = writer_from_opts(self.opt.flag_o, &self.opt.arg_out);
|
||||
match match protocol {
|
||||
"standard-request" => call.doit(),
|
||||
@@ -287,6 +300,9 @@ impl Engine {
|
||||
None
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
if self.opt.flag_scope.len() > 0 {
|
||||
call = call.add_scope(&self.opt.flag_scope);
|
||||
}
|
||||
let mut ostream = writer_from_opts(self.opt.flag_o, &self.opt.arg_out);
|
||||
match match protocol {
|
||||
"standard-request" => call.doit(),
|
||||
@@ -336,6 +352,9 @@ impl Engine {
|
||||
None
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
if self.opt.flag_scope.len() > 0 {
|
||||
call = call.add_scope(&self.opt.flag_scope);
|
||||
}
|
||||
let mut ostream = writer_from_opts(self.opt.flag_o, &self.opt.arg_out);
|
||||
match match protocol {
|
||||
"standard-request" => call.doit(),
|
||||
@@ -379,6 +398,9 @@ impl Engine {
|
||||
None
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
if self.opt.flag_scope.len() > 0 {
|
||||
call = call.add_scope(&self.opt.flag_scope);
|
||||
}
|
||||
let mut ostream = writer_from_opts(self.opt.flag_o, &self.opt.arg_out);
|
||||
match match protocol {
|
||||
"standard-request" => call.doit(),
|
||||
@@ -422,6 +444,9 @@ impl Engine {
|
||||
None
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
if self.opt.flag_scope.len() > 0 {
|
||||
call = call.add_scope(&self.opt.flag_scope);
|
||||
}
|
||||
let mut ostream = writer_from_opts(self.opt.flag_o, &self.opt.arg_out);
|
||||
match match protocol {
|
||||
"standard-request" => call.doit(),
|
||||
@@ -465,6 +490,9 @@ impl Engine {
|
||||
None
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
if self.opt.flag_scope.len() > 0 {
|
||||
call = call.add_scope(&self.opt.flag_scope);
|
||||
}
|
||||
let mut ostream = writer_from_opts(self.opt.flag_o, &self.opt.arg_out);
|
||||
match match protocol {
|
||||
"standard-request" => call.doit(),
|
||||
@@ -508,6 +536,9 @@ impl Engine {
|
||||
None
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
if self.opt.flag_scope.len() > 0 {
|
||||
call = call.add_scope(&self.opt.flag_scope);
|
||||
}
|
||||
let mut ostream = writer_from_opts(self.opt.flag_o, &self.opt.arg_out);
|
||||
match match protocol {
|
||||
"standard-request" => call.doit(),
|
||||
@@ -576,6 +607,9 @@ impl Engine {
|
||||
None
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
if self.opt.flag_scope.len() > 0 {
|
||||
call = call.add_scope(&self.opt.flag_scope);
|
||||
}
|
||||
let mut ostream = writer_from_opts(self.opt.flag_o, &self.opt.arg_out);
|
||||
match match protocol {
|
||||
"standard-request" => call.doit(),
|
||||
@@ -632,6 +666,9 @@ impl Engine {
|
||||
None
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
if self.opt.flag_scope.len() > 0 {
|
||||
call = call.add_scope(&self.opt.flag_scope);
|
||||
}
|
||||
let mut ostream = writer_from_opts(self.opt.flag_o, &self.opt.arg_out);
|
||||
match match protocol {
|
||||
"standard-request" => call.doit(),
|
||||
@@ -681,6 +718,9 @@ impl Engine {
|
||||
None
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
if self.opt.flag_scope.len() > 0 {
|
||||
call = call.add_scope(&self.opt.flag_scope);
|
||||
}
|
||||
let mut ostream = writer_from_opts(self.opt.flag_o, &self.opt.arg_out);
|
||||
match match protocol {
|
||||
"standard-request" => call.doit(),
|
||||
@@ -730,6 +770,9 @@ impl Engine {
|
||||
None
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
if self.opt.flag_scope.len() > 0 {
|
||||
call = call.add_scope(&self.opt.flag_scope);
|
||||
}
|
||||
let mut ostream = writer_from_opts(self.opt.flag_o, &self.opt.arg_out);
|
||||
match match protocol {
|
||||
"standard-request" => call.doit(),
|
||||
@@ -849,6 +892,7 @@ impl Engine {
|
||||
|
||||
fn main() {
|
||||
let opts: Options = Options::docopt().decode().unwrap_or_else(|e| e.exit());
|
||||
let debug = opts.flag_debug;
|
||||
match Engine::new(opts) {
|
||||
Err(err) => {
|
||||
writeln!(io::stderr(), "{}", err).ok();
|
||||
@@ -856,8 +900,11 @@ fn main() {
|
||||
},
|
||||
Ok(engine) => {
|
||||
if let Some(err) = engine.doit() {
|
||||
writeln!(io::stderr(), "{:?}", err).ok();
|
||||
writeln!(io::stderr(), "{}", err).ok();
|
||||
if debug {
|
||||
writeln!(io::stderr(), "{:?}", err).ok();
|
||||
} else {
|
||||
writeln!(io::stderr(), "{}", err).ok();
|
||||
}
|
||||
env::set_exit_status(1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user