mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-21 02:37:05 +01:00
update all code after version update
This commit is contained in:
@@ -71,7 +71,7 @@ impl<'n> Engine<'n> {
|
||||
}
|
||||
}
|
||||
let vals = opt.values_of("mode").unwrap().collect::<Vec<&str>>();
|
||||
let protocol = calltype_from_str(vals[0], ["simple", "resumable"].iter().map(|&v| v.to_string()).collect(), err);
|
||||
let protocol = calltype_from_str(vals[0], ["simple"].iter().map(|&v| v.to_string()).collect(), err);
|
||||
let mut input_file = input_file_from_opts(vals[1], err);
|
||||
let mime_type = input_mime_from_opts(opt.value_of("mime").unwrap_or("application/octet-stream"), err);
|
||||
if dry_run {
|
||||
@@ -87,7 +87,6 @@ impl<'n> Engine<'n> {
|
||||
};
|
||||
match match protocol {
|
||||
CallType::Upload(UploadProtocol::Simple) => call.upload(input_file.unwrap(), mime_type.unwrap()),
|
||||
CallType::Upload(UploadProtocol::Resumable) => call.upload_resumable(input_file.unwrap(), mime_type.unwrap()),
|
||||
CallType::Standard => unreachable!()
|
||||
} {
|
||||
Err(api_err) => Err(DoitError::ApiError(api_err)),
|
||||
@@ -173,12 +172,15 @@ impl<'n> Engine<'n> {
|
||||
let engine = Engine {
|
||||
opt: opt,
|
||||
hub: api::GroupsMigration::new(client, auth),
|
||||
gp: vec!["alt", "fields", "key", "oauth-token", "pretty-print", "quota-user", "user-ip"],
|
||||
gp: vec!["$-xgafv", "access-token", "alt", "callback", "fields", "key", "oauth-token", "pretty-print", "quota-user", "upload-type", "upload-protocol"],
|
||||
gpm: vec![
|
||||
("$-xgafv", "$.xgafv"),
|
||||
("access-token", "access_token"),
|
||||
("oauth-token", "oauth_token"),
|
||||
("pretty-print", "prettyPrint"),
|
||||
("quota-user", "quotaUser"),
|
||||
("user-ip", "userIp"),
|
||||
("upload-type", "uploadType"),
|
||||
("upload-protocol", "upload_protocol"),
|
||||
]
|
||||
};
|
||||
|
||||
@@ -214,7 +216,7 @@ fn main() {
|
||||
|
||||
(Some(r##"mode"##),
|
||||
Some(r##"u"##),
|
||||
Some(r##"Specify the upload protocol (simple|resumable) and the file to upload"##),
|
||||
Some(r##"Specify the upload protocol (simple) and the file to upload"##),
|
||||
Some(true),
|
||||
Some(true)),
|
||||
|
||||
@@ -236,8 +238,9 @@ fn main() {
|
||||
|
||||
let mut app = App::new("groupsmigration1")
|
||||
.author("Sebastian Thiel <byronimo@gmail.com>")
|
||||
.version("1.0.13+20181126")
|
||||
.about("Groups Migration Api.")
|
||||
.version("1.0.14+20200630")
|
||||
.about("The Groups Migration API allows domain administrators to archive
|
||||
emails into Google groups.")
|
||||
.after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_groupsmigration1_cli")
|
||||
.arg(Arg::with_name("url")
|
||||
.long("scope")
|
||||
|
||||
Reference in New Issue
Block a user