fix(version-up): code updated to v0.1.6, latest CLI

* also includes publishing tag files
This commit is contained in:
Sebastian Thiel
2015-04-26 13:42:31 +02:00
parent 4e275eaadd
commit c2dd9c7a02
770 changed files with 63340 additions and 31427 deletions

View File

@@ -19,63 +19,64 @@ use std::io::{self, Write};
docopt!(Options derive Debug, "
Usage:
adsense1d4 [options] accounts adclients-list <account-id> [-p <v>]... [-o <out>]
adsense1d4 [options] accounts adunits-customchannels-list <account-id> <ad-client-id> <ad-unit-id> [-p <v>]... [-o <out>]
adsense1d4 [options] accounts adunits-get <account-id> <ad-client-id> <ad-unit-id> [-p <v>]... [-o <out>]
adsense1d4 [options] accounts adunits-get-ad-code <account-id> <ad-client-id> <ad-unit-id> [-p <v>]... [-o <out>]
adsense1d4 [options] accounts adunits-list <account-id> <ad-client-id> [-p <v>]... [-o <out>]
adsense1d4 [options] accounts alerts-delete <account-id> <alert-id> [-p <v>]...
adsense1d4 [options] accounts alerts-list <account-id> [-p <v>]... [-o <out>]
adsense1d4 [options] accounts customchannels-adunits-list <account-id> <ad-client-id> <custom-channel-id> [-p <v>]... [-o <out>]
adsense1d4 [options] accounts customchannels-get <account-id> <ad-client-id> <custom-channel-id> [-p <v>]... [-o <out>]
adsense1d4 [options] accounts customchannels-list <account-id> <ad-client-id> [-p <v>]... [-o <out>]
adsense1d4 [options] accounts get <account-id> [-p <v>]... [-o <out>]
adsense1d4 [options] accounts list [-p <v>]... [-o <out>]
adsense1d4 [options] accounts payments-list <account-id> [-p <v>]... [-o <out>]
adsense1d4 [options] accounts reports-generate <account-id> <start-date> <end-date> [-p <v>]... [-o <out>]
adsense1d4 [options] accounts reports-saved-generate <account-id> <saved-report-id> [-p <v>]... [-o <out>]
adsense1d4 [options] accounts reports-saved-list <account-id> [-p <v>]... [-o <out>]
adsense1d4 [options] accounts savedadstyles-get <account-id> <saved-ad-style-id> [-p <v>]... [-o <out>]
adsense1d4 [options] accounts savedadstyles-list <account-id> [-p <v>]... [-o <out>]
adsense1d4 [options] accounts urlchannels-list <account-id> <ad-client-id> [-p <v>]... [-o <out>]
adsense1d4 [options] adclients list [-p <v>]... [-o <out>]
adsense1d4 [options] adunits customchannels-list <ad-client-id> <ad-unit-id> [-p <v>]... [-o <out>]
adsense1d4 [options] adunits get <ad-client-id> <ad-unit-id> [-p <v>]... [-o <out>]
adsense1d4 [options] adunits get-ad-code <ad-client-id> <ad-unit-id> [-p <v>]... [-o <out>]
adsense1d4 [options] adunits list <ad-client-id> [-p <v>]... [-o <out>]
adsense1d4 [options] alerts delete <alert-id> [-p <v>]...
adsense1d4 [options] alerts list [-p <v>]... [-o <out>]
adsense1d4 [options] customchannels adunits-list <ad-client-id> <custom-channel-id> [-p <v>]... [-o <out>]
adsense1d4 [options] customchannels get <ad-client-id> <custom-channel-id> [-p <v>]... [-o <out>]
adsense1d4 [options] customchannels list <ad-client-id> [-p <v>]... [-o <out>]
adsense1d4 [options] metadata dimensions-list [-p <v>]... [-o <out>]
adsense1d4 [options] metadata metrics-list [-p <v>]... [-o <out>]
adsense1d4 [options] payments list [-p <v>]... [-o <out>]
adsense1d4 [options] reports generate <start-date> <end-date> [-p <v>]... [-o <out>]
adsense1d4 [options] reports saved-generate <saved-report-id> [-p <v>]... [-o <out>]
adsense1d4 [options] reports saved-list [-p <v>]... [-o <out>]
adsense1d4 [options] savedadstyles get <saved-ad-style-id> [-p <v>]... [-o <out>]
adsense1d4 [options] savedadstyles list [-p <v>]... [-o <out>]
adsense1d4 [options] urlchannels list <ad-client-id> [-p <v>]... [-o <out>]
adsense1d4 [options] accounts adclients-list <account-id> [-p <v>...] [-o <out>]
adsense1d4 [options] accounts adunits-customchannels-list <account-id> <ad-client-id> <ad-unit-id> [-p <v>...] [-o <out>]
adsense1d4 [options] accounts adunits-get <account-id> <ad-client-id> <ad-unit-id> [-p <v>...] [-o <out>]
adsense1d4 [options] accounts adunits-get-ad-code <account-id> <ad-client-id> <ad-unit-id> [-p <v>...] [-o <out>]
adsense1d4 [options] accounts adunits-list <account-id> <ad-client-id> [-p <v>...] [-o <out>]
adsense1d4 [options] accounts alerts-delete <account-id> <alert-id> [-p <v>...]
adsense1d4 [options] accounts alerts-list <account-id> [-p <v>...] [-o <out>]
adsense1d4 [options] accounts customchannels-adunits-list <account-id> <ad-client-id> <custom-channel-id> [-p <v>...] [-o <out>]
adsense1d4 [options] accounts customchannels-get <account-id> <ad-client-id> <custom-channel-id> [-p <v>...] [-o <out>]
adsense1d4 [options] accounts customchannels-list <account-id> <ad-client-id> [-p <v>...] [-o <out>]
adsense1d4 [options] accounts get <account-id> [-p <v>...] [-o <out>]
adsense1d4 [options] accounts list [-p <v>...] [-o <out>]
adsense1d4 [options] accounts payments-list <account-id> [-p <v>...] [-o <out>]
adsense1d4 [options] accounts reports-generate <account-id> <start-date> <end-date> [-p <v>...] [-o <out>]
adsense1d4 [options] accounts reports-saved-generate <account-id> <saved-report-id> [-p <v>...] [-o <out>]
adsense1d4 [options] accounts reports-saved-list <account-id> [-p <v>...] [-o <out>]
adsense1d4 [options] accounts savedadstyles-get <account-id> <saved-ad-style-id> [-p <v>...] [-o <out>]
adsense1d4 [options] accounts savedadstyles-list <account-id> [-p <v>...] [-o <out>]
adsense1d4 [options] accounts urlchannels-list <account-id> <ad-client-id> [-p <v>...] [-o <out>]
adsense1d4 [options] adclients list [-p <v>...] [-o <out>]
adsense1d4 [options] adunits customchannels-list <ad-client-id> <ad-unit-id> [-p <v>...] [-o <out>]
adsense1d4 [options] adunits get <ad-client-id> <ad-unit-id> [-p <v>...] [-o <out>]
adsense1d4 [options] adunits get-ad-code <ad-client-id> <ad-unit-id> [-p <v>...] [-o <out>]
adsense1d4 [options] adunits list <ad-client-id> [-p <v>...] [-o <out>]
adsense1d4 [options] alerts delete <alert-id> [-p <v>...]
adsense1d4 [options] alerts list [-p <v>...] [-o <out>]
adsense1d4 [options] customchannels adunits-list <ad-client-id> <custom-channel-id> [-p <v>...] [-o <out>]
adsense1d4 [options] customchannels get <ad-client-id> <custom-channel-id> [-p <v>...] [-o <out>]
adsense1d4 [options] customchannels list <ad-client-id> [-p <v>...] [-o <out>]
adsense1d4 [options] metadata dimensions-list [-p <v>...] [-o <out>]
adsense1d4 [options] metadata metrics-list [-p <v>...] [-o <out>]
adsense1d4 [options] payments list [-p <v>...] [-o <out>]
adsense1d4 [options] reports generate <start-date> <end-date> [-p <v>...] [-o <out>]
adsense1d4 [options] reports saved-generate <saved-report-id> [-p <v>...] [-o <out>]
adsense1d4 [options] reports saved-list [-p <v>...] [-o <out>]
adsense1d4 [options] savedadstyles get <saved-ad-style-id> [-p <v>...] [-o <out>]
adsense1d4 [options] savedadstyles list [-p <v>...] [-o <out>]
adsense1d4 [options] urlchannels list <ad-client-id> [-p <v>...] [-o <out>]
adsense1d4 --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_adsense1d4_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;
@@ -130,6 +131,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(),
@@ -179,6 +183,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(),
@@ -222,6 +229,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(),
@@ -265,6 +275,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(),
@@ -317,6 +330,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(),
@@ -360,6 +376,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);
}
match match protocol {
"standard-request" => call.doit(),
_ => unreachable!(),
@@ -404,6 +423,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(),
@@ -456,6 +478,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(),
@@ -499,6 +524,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(),
@@ -548,6 +576,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(),
@@ -594,6 +625,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(),
@@ -643,6 +677,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(),
@@ -686,6 +723,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(),
@@ -760,6 +800,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(),
@@ -816,6 +859,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(),
@@ -865,6 +911,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(),
@@ -908,6 +957,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(),
@@ -957,6 +1009,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(),
@@ -1006,6 +1061,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(),
@@ -1055,6 +1113,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(),
@@ -1104,6 +1165,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(),
@@ -1147,6 +1211,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(),
@@ -1190,6 +1257,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(),
@@ -1242,6 +1312,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(),
@@ -1285,6 +1358,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);
}
match match protocol {
"standard-request" => call.doit(),
_ => unreachable!(),
@@ -1329,6 +1405,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(),
@@ -1381,6 +1460,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(),
@@ -1424,6 +1506,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(),
@@ -1473,6 +1558,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(),
@@ -1516,6 +1604,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(),
@@ -1559,6 +1650,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(),
@@ -1602,6 +1696,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(),
@@ -1679,6 +1776,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(),
@@ -1735,6 +1835,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(),
@@ -1784,6 +1887,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(),
@@ -1827,6 +1933,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(),
@@ -1876,6 +1985,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(),
@@ -1925,6 +2037,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(),
@@ -2137,6 +2252,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();
@@ -2144,8 +2260,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);
}
}