mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-06 11:34:34 +01:00
Align CLI generator with changes in string type handling
There was some duplicated logic here.
This commit is contained in:
@@ -278,7 +278,7 @@ impl<'n> Engine<'n> {
|
||||
let (key, value) = parse_kv_arg(&*parg, err, false);
|
||||
match key {
|
||||
"timed-count-duration" => {
|
||||
call = call.timed_count_duration(arg_from_str(value.unwrap_or("-0"), err, "timed-count-duration", "int64"));
|
||||
call = call.timed_count_duration(value.unwrap_or(""));
|
||||
},
|
||||
"time-range-period" => {
|
||||
call = call.time_range_period(value.unwrap_or(""));
|
||||
|
||||
@@ -56,7 +56,7 @@ impl<'n> Engine<'n> {
|
||||
call = call.start_change_id(value.unwrap_or(""));
|
||||
},
|
||||
"max-change-id-count" => {
|
||||
call = call.max_change_id_count(arg_from_str(value.unwrap_or("-0"), err, "max-change-id-count", "int64"));
|
||||
call = call.max_change_id_count(value.unwrap_or(""));
|
||||
},
|
||||
"include-subscribed" => {
|
||||
call = call.include_subscribed(arg_from_str(value.unwrap_or("false"), err, "include-subscribed", "boolean"));
|
||||
|
||||
@@ -151,8 +151,6 @@ def docopt_mode(protocols):
|
||||
# Returns a possibly remapped type, based on its name.
|
||||
# Useful to map strings to more suitable types, i.e. counts
|
||||
def actual_json_type(name, type):
|
||||
if type == 'string' and 'Count' in name:
|
||||
return 'int64'
|
||||
return type
|
||||
|
||||
# return a string representing property `p` suitable for docopt argument parsing
|
||||
|
||||
Reference in New Issue
Block a user