mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
fix(clap): upload some code to help debugging
We get a stack-overflow when trying to run the dfa-reporting program, and right now I don't know how to workaround it. This could be preventing us from using clap.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
[package]
|
||||
|
||||
name = "google-dfareporting2d1-cli"
|
||||
version = "0.1.0+20150326"
|
||||
version = "0.2.0+20150326"
|
||||
authors = ["Sebastian Thiel <byronimo@gmail.com>"]
|
||||
description = "A complete library to interact with dfareporting (protocol v2.1)"
|
||||
repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dfareporting2d1-cli"
|
||||
@@ -20,8 +20,7 @@ name = "dfareporting2d1"
|
||||
hyper = "*"
|
||||
mime = "*"
|
||||
yup-oauth2 = "*"
|
||||
docopt = "*"
|
||||
docopt_macros = "*"
|
||||
clap = "*"
|
||||
rustc-serialize = "*"
|
||||
yup-hyper-mock = "*"
|
||||
serde = ">= 0.3.0"
|
||||
|
||||
@@ -10,9 +10,12 @@ capabilities. Errors will be printed to standard error, and cause the program's
|
||||
|
||||
If data-structures are requested, these will be returned as pretty-printed JSON, to be useful as input to other tools.
|
||||
|
||||
Everything else about the *dfareporting* API can be found at the
|
||||
[official documentation site](https://developers.google.com/doubleclick-advertisers/reporting/).
|
||||
|
||||
# Usage
|
||||
|
||||
This documentation was generated from the *dfareporting* API at revision *20150326*. The CLI is at version *0.1.0*.
|
||||
This documentation was generated from the *dfareporting* API at revision *20150326*. The CLI is at version *0.2.0*.
|
||||
|
||||
```bash
|
||||
dfareporting2d1 [options] account-active-ad-summaries get <profile-id> <summary-account-id> [-p <v>...] [-o <out>]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
site_name: dfareporting v0.1.0+20150326
|
||||
site_name: dfareporting v0.2.0+20150326
|
||||
site_url: http://byron.github.io/google-apis-rs/google-dfareporting2d1-cli
|
||||
site_description: Write integrating applications with bcore
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -288,7 +288,7 @@ These will always take a single argument, for which the following statements are
|
||||
|
||||
* [PODs][wiki-pod] are handed by copy
|
||||
* strings are passed as `&str`
|
||||
* [request values](http://byron.github.io/google-apis-rs/google_dfareporting2d1/trait.RequestValue.html) are borrowed
|
||||
* [request values](http://byron.github.io/google-apis-rs/google_dfareporting2d1/trait.RequestValue.html) are moved
|
||||
|
||||
Arguments will always be copied or cloned into the builder, to make them independent of their original life times.
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@
|
||||
[package]
|
||||
|
||||
name = "google-discovery1-cli"
|
||||
version = "0.1.0+00000000"
|
||||
version = "0.2.0+00000000"
|
||||
authors = ["Sebastian Thiel <byronimo@gmail.com>"]
|
||||
description = "A complete library to interact with discovery (protocol v1)"
|
||||
repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/discovery1-cli"
|
||||
@@ -20,8 +20,7 @@ name = "discovery1"
|
||||
hyper = "*"
|
||||
mime = "*"
|
||||
yup-oauth2 = "*"
|
||||
docopt = "*"
|
||||
docopt_macros = "*"
|
||||
clap = "*"
|
||||
rustc-serialize = "*"
|
||||
yup-hyper-mock = "*"
|
||||
serde = ">= 0.3.0"
|
||||
|
||||
@@ -10,9 +10,12 @@ capabilities. Errors will be printed to standard error, and cause the program's
|
||||
|
||||
If data-structures are requested, these will be returned as pretty-printed JSON, to be useful as input to other tools.
|
||||
|
||||
Everything else about the *discovery* API can be found at the
|
||||
[official documentation site](https://developers.google.com/discovery/).
|
||||
|
||||
# Usage
|
||||
|
||||
This documentation was generated from the *discovery* API at revision *00000000*. The CLI is at version *0.1.0*.
|
||||
This documentation was generated from the *discovery* API at revision *00000000*. The CLI is at version *0.2.0*.
|
||||
|
||||
```bash
|
||||
discovery1 [options] apis get-rest <api> <version> [-p <v>...] [-o <out>]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
site_name: discovery v0.1.0+00000000
|
||||
site_name: discovery v0.2.0+00000000
|
||||
site_url: http://byron.github.io/google-apis-rs/google-discovery1-cli
|
||||
site_description: Write integrating applications with bcore
|
||||
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
// This file was generated automatically from 'src/mako/cli/main.rs.mako'
|
||||
// DO NOT EDIT !
|
||||
#![feature(plugin, exit_status)]
|
||||
#![plugin(docopt_macros)]
|
||||
#![allow(unused_variables, unused_imports, dead_code, unused_mut)]
|
||||
|
||||
extern crate docopt;
|
||||
extern crate clap;
|
||||
extern crate yup_oauth2 as oauth2;
|
||||
extern crate yup_hyper_mock as mock;
|
||||
extern crate rustc_serialize;
|
||||
@@ -16,234 +15,77 @@ extern crate google_discovery1 as api;
|
||||
|
||||
use std::env;
|
||||
use std::io::{self, Write};
|
||||
|
||||
docopt!(Options derive Debug, "
|
||||
Usage:
|
||||
discovery1 [options] apis get-rest <api> <version> [-p <v>...] [-o <out>]
|
||||
discovery1 [options] apis list [-p <v>...] [-o <out>]
|
||||
discovery1 --help
|
||||
|
||||
All documentation details can be found at
|
||||
http://byron.github.io/google-apis-rs/google_discovery1_cli/index.html
|
||||
|
||||
Configuration:
|
||||
--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.
|
||||
[default: ~/.google-service-cli]
|
||||
--debug
|
||||
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.
|
||||
");
|
||||
|
||||
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};
|
||||
|
||||
use std::default::Default;
|
||||
use std::str::FromStr;
|
||||
|
||||
use oauth2::{Authenticator, DefaultAuthenticatorDelegate};
|
||||
use rustc_serialize::json;
|
||||
|
||||
struct Engine {
|
||||
opt: Options,
|
||||
hub: api::Discovery<hyper::Client, Authenticator<DefaultAuthenticatorDelegate, JsonTokenStorage, hyper::Client>>,
|
||||
}
|
||||
|
||||
|
||||
impl Engine {
|
||||
fn _apis_get_rest(&self, dry_run: bool, err: &mut InvalidOptionsError)
|
||||
-> Option<api::Error> {
|
||||
let mut call = self.hub.apis().get_rest(&self.opt.arg_api, &self.opt.arg_version);
|
||||
for parg in self.opt.arg_v.iter() {
|
||||
let (key, value) = parse_kv_arg(&*parg, err, false);
|
||||
match key {
|
||||
"alt"
|
||||
|"fields"
|
||||
|"key"
|
||||
|"oauth-token"
|
||||
|"pretty-print"
|
||||
|"quota-user"
|
||||
|"user-ip" => {
|
||||
let map = [
|
||||
("oauth-token", "oauth_token"),
|
||||
("pretty-print", "prettyPrint"),
|
||||
("quota-user", "quotaUser"),
|
||||
("user-ip", "userIp"),
|
||||
];
|
||||
call = call.param(map.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset"))
|
||||
},
|
||||
_ => err.issues.push(CLIError::UnknownParameter(key.to_string())),
|
||||
}
|
||||
}
|
||||
let protocol = "standard-request";
|
||||
if dry_run {
|
||||
None
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
let mut ostream = writer_from_opts(self.opt.flag_o, &self.opt.arg_out);
|
||||
match match protocol {
|
||||
"standard-request" => call.doit(),
|
||||
_ => unreachable!(),
|
||||
} {
|
||||
Err(api_err) => Some(api_err),
|
||||
Ok((mut response, output_schema)) => {
|
||||
serde::json::to_writer_pretty(&mut ostream, &output_schema).unwrap();
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn _apis_list(&self, dry_run: bool, err: &mut InvalidOptionsError)
|
||||
-> Option<api::Error> {
|
||||
let mut call = self.hub.apis().list();
|
||||
for parg in self.opt.arg_v.iter() {
|
||||
let (key, value) = parse_kv_arg(&*parg, err, false);
|
||||
match key {
|
||||
"preferred" => {
|
||||
call = call.preferred(arg_from_str(value.unwrap_or("false"), err, "preferred", "boolean"));
|
||||
},
|
||||
"name" => {
|
||||
call = call.name(value.unwrap_or(""));
|
||||
},
|
||||
"alt"
|
||||
|"fields"
|
||||
|"key"
|
||||
|"oauth-token"
|
||||
|"pretty-print"
|
||||
|"quota-user"
|
||||
|"user-ip" => {
|
||||
let map = [
|
||||
("oauth-token", "oauth_token"),
|
||||
("pretty-print", "prettyPrint"),
|
||||
("quota-user", "quotaUser"),
|
||||
("user-ip", "userIp"),
|
||||
];
|
||||
call = call.param(map.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset"))
|
||||
},
|
||||
_ => err.issues.push(CLIError::UnknownParameter(key.to_string())),
|
||||
}
|
||||
}
|
||||
let protocol = "standard-request";
|
||||
if dry_run {
|
||||
None
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
let mut ostream = writer_from_opts(self.opt.flag_o, &self.opt.arg_out);
|
||||
match match protocol {
|
||||
"standard-request" => call.doit(),
|
||||
_ => unreachable!(),
|
||||
} {
|
||||
Err(api_err) => Some(api_err),
|
||||
Ok((mut response, output_schema)) => {
|
||||
serde::json::to_writer_pretty(&mut ostream, &output_schema).unwrap();
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn _doit(&self, dry_run: bool) -> (Option<api::Error>, Option<InvalidOptionsError>) {
|
||||
let mut err = InvalidOptionsError::new();
|
||||
let mut call_result: Option<api::Error>;
|
||||
let mut err_opt: Option<InvalidOptionsError> = None;
|
||||
|
||||
if self.opt.cmd_apis {
|
||||
if self.opt.cmd_get_rest {
|
||||
call_result = self._apis_get_rest(dry_run, &mut err);
|
||||
} else if self.opt.cmd_list {
|
||||
call_result = self._apis_list(dry_run, &mut err);
|
||||
} else {
|
||||
unreachable!();
|
||||
}
|
||||
} else {
|
||||
unreachable!();
|
||||
}
|
||||
|
||||
if dry_run {
|
||||
if err.issues.len() > 0 {
|
||||
err_opt = Some(err);
|
||||
}
|
||||
}
|
||||
(call_result, err_opt)
|
||||
}
|
||||
|
||||
// Please note that this call will fail if any part of the opt can't be handled
|
||||
fn new(opt: Options) -> Result<Engine, InvalidOptionsError> {
|
||||
let (config_dir, secret) = {
|
||||
let config_dir = match cmn::assure_config_dir_exists(&opt.flag_config_dir) {
|
||||
Err(e) => return Err(InvalidOptionsError::single(e, 3)),
|
||||
Ok(p) => p,
|
||||
};
|
||||
|
||||
match cmn::application_secret_from_directory(&config_dir, "discovery1-secret.json",
|
||||
"{\"installed\":{\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"client_secret\":\"hCsslbCUyfehWMmbkG8vTYxG\",\"token_uri\":\"https://accounts.google.com/o/oauth2/token\",\"client_email\":\"\",\"redirect_uris\":[\"urn:ietf:wg:oauth:2.0:oob\",\"oob\"],\"client_x509_cert_url\":\"\",\"client_id\":\"620010449518-9ngf7o4dhs0dka470npqvor6dc5lqb9b.apps.googleusercontent.com\",\"auth_provider_x509_cert_url\":\"https://www.googleapis.com/oauth2/v1/certs\"}}") {
|
||||
Ok(secret) => (config_dir, secret),
|
||||
Err(e) => return Err(InvalidOptionsError::single(e, 4))
|
||||
}
|
||||
};
|
||||
|
||||
let auth = Authenticator::new( &secret, DefaultAuthenticatorDelegate,
|
||||
if opt.flag_debug_auth {
|
||||
hyper::Client::with_connector(mock::TeeConnector {
|
||||
connector: hyper::net::HttpConnector(None)
|
||||
})
|
||||
} else {
|
||||
hyper::Client::new()
|
||||
},
|
||||
JsonTokenStorage {
|
||||
program_name: "discovery1",
|
||||
db_dir: config_dir.clone(),
|
||||
}, None);
|
||||
|
||||
let client =
|
||||
if opt.flag_debug {
|
||||
hyper::Client::with_connector(mock::TeeConnector {
|
||||
connector: hyper::net::HttpConnector(None)
|
||||
})
|
||||
} else {
|
||||
hyper::Client::new()
|
||||
};
|
||||
let engine = Engine {
|
||||
opt: opt,
|
||||
hub: api::Discovery::new(client, auth),
|
||||
};
|
||||
|
||||
match engine._doit(true) {
|
||||
(_, Some(err)) => Err(err),
|
||||
_ => Ok(engine),
|
||||
}
|
||||
}
|
||||
|
||||
// Execute the call with all the bells and whistles, informing the caller only if there was an error.
|
||||
// The absense of one indicates success.
|
||||
fn doit(&self) -> Option<api::Error> {
|
||||
self._doit(false).0
|
||||
}
|
||||
}
|
||||
use clap::{App, SubCommand, Arg};
|
||||
|
||||
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();
|
||||
env::set_exit_status(err.exit_code);
|
||||
},
|
||||
Ok(engine) => {
|
||||
if let Some(err) = engine.doit() {
|
||||
if debug {
|
||||
writeln!(io::stderr(), "{:?}", err).ok();
|
||||
} else {
|
||||
writeln!(io::stderr(), "{}", err).ok();
|
||||
}
|
||||
env::set_exit_status(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
let matches =
|
||||
App::new("discovery1")
|
||||
.author("Sebastian Thiel <byronimo@gmail.com>")
|
||||
.version("0.2.0")
|
||||
.about("Lets you discover information about other Google APIs, such as what APIs are available, the resource and method details for each API.")
|
||||
.after_help("All documentation details can be found athttp://byron.github.io/google-apis-rs/google_discovery1_cli/index.html")
|
||||
.arg(Arg::with_name("folder")
|
||||
.long("config-dir")
|
||||
.help("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: ${CONFIG_DIR}]")
|
||||
.takes_value(true))
|
||||
.arg(Arg::with_name("debug")
|
||||
.long("debug")
|
||||
.help("Output all server communication to standard error. `tx` and `rx` are placed into the same stream.")
|
||||
.takes_value(false))
|
||||
.arg(Arg::with_name("debug-auth")
|
||||
.long("debug-auth")
|
||||
.help("Output all communication related to authentication to standard error. `tx` and `rx` are placed into the same stream.")
|
||||
.takes_value(false))
|
||||
.subcommand(
|
||||
SubCommand::new("apis")
|
||||
.subcommand(
|
||||
SubCommand::new("get-rest")
|
||||
.about("Retrieve the description of a particular version of an api.")
|
||||
.arg(
|
||||
Arg::with_name("api")
|
||||
.help("The name of the API.")
|
||||
.required(true)
|
||||
.multiple(false))
|
||||
.arg(
|
||||
Arg::with_name("version")
|
||||
.help("The version of the API.")
|
||||
.required(true)
|
||||
.multiple(false))
|
||||
.arg(
|
||||
Arg::with_name("v")
|
||||
.short("p")
|
||||
.help("Set various fields of the request structure")
|
||||
.takes_value(true)
|
||||
.required(false)
|
||||
.multiple(true))
|
||||
.arg(
|
||||
Arg::with_name("<out>")
|
||||
.short("o")
|
||||
.help("Specify the file into which to write the programs output")
|
||||
.takes_value(true)
|
||||
.required(false)
|
||||
.multiple(false))
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::new("list")
|
||||
.about("Retrieve the list of APIs supported at this endpoint.")
|
||||
.arg(
|
||||
Arg::with_name("v")
|
||||
.short("p")
|
||||
.help("Set various fields of the request structure")
|
||||
.takes_value(true)
|
||||
.required(false)
|
||||
.multiple(true))
|
||||
.arg(
|
||||
Arg::with_name("<out>")
|
||||
.short("o")
|
||||
.help("Specify the file into which to write the programs output")
|
||||
.takes_value(true)
|
||||
.required(false)
|
||||
.multiple(false))
|
||||
)
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
|
||||
}
|
||||
@@ -157,7 +157,7 @@ These will always take a single argument, for which the following statements are
|
||||
|
||||
* [PODs][wiki-pod] are handed by copy
|
||||
* strings are passed as `&str`
|
||||
* [request values](http://byron.github.io/google-apis-rs/google_discovery1/trait.RequestValue.html) are borrowed
|
||||
* [request values](http://byron.github.io/google-apis-rs/google_discovery1/trait.RequestValue.html) are moved
|
||||
|
||||
Arguments will always be copied or cloned into the builder, to make them independent of their original life times.
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
//!
|
||||
//! * [PODs][wiki-pod] are handed by copy
|
||||
//! * strings are passed as `&str`
|
||||
//! * [request values](trait.RequestValue.html) are borrowed
|
||||
//! * [request values](trait.RequestValue.html) are moved
|
||||
//!
|
||||
//! Arguments will always be copied or cloned into the builder, to make them independent of their original life times.
|
||||
//!
|
||||
@@ -978,7 +978,7 @@ impl<'a, C, A> ApiGetRestCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
loop {
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()));
|
||||
|
||||
dlg.pre_request();
|
||||
@@ -1176,7 +1176,7 @@ impl<'a, C, A> ApiListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oauth
|
||||
loop {
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()));
|
||||
|
||||
dlg.pre_request();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
[package]
|
||||
|
||||
name = "google-youtube3-cli"
|
||||
version = "0.1.0+20150414"
|
||||
version = "0.2.0+20150414"
|
||||
authors = ["Sebastian Thiel <byronimo@gmail.com>"]
|
||||
description = "A complete library to interact with YouTube (protocol v3)"
|
||||
repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/youtube3-cli"
|
||||
@@ -20,8 +20,7 @@ name = "youtube3"
|
||||
hyper = "*"
|
||||
mime = "*"
|
||||
yup-oauth2 = "*"
|
||||
docopt = "*"
|
||||
docopt_macros = "*"
|
||||
clap = "*"
|
||||
rustc-serialize = "*"
|
||||
yup-hyper-mock = "*"
|
||||
serde = ">= 0.3.0"
|
||||
|
||||
@@ -10,9 +10,12 @@ capabilities. Errors will be printed to standard error, and cause the program's
|
||||
|
||||
If data-structures are requested, these will be returned as pretty-printed JSON, to be useful as input to other tools.
|
||||
|
||||
Everything else about the *YouTube* API can be found at the
|
||||
[official documentation site](https://developers.google.com/youtube/v3).
|
||||
|
||||
# Usage
|
||||
|
||||
This documentation was generated from the *YouTube* API at revision *20150414*. The CLI is at version *0.1.0*.
|
||||
This documentation was generated from the *YouTube* API at revision *20150414*. The CLI is at version *0.2.0*.
|
||||
|
||||
```bash
|
||||
youtube3 [options] activities insert -r <kv>... [-p <v>...] [-o <out>]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
site_name: YouTube v0.1.0+20150414
|
||||
site_name: YouTube v0.2.0+20150414
|
||||
site_url: http://byron.github.io/google-apis-rs/google-youtube3-cli
|
||||
site_description: Write integrating applications with bcore
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -230,7 +230,7 @@ These will always take a single argument, for which the following statements are
|
||||
|
||||
* [PODs][wiki-pod] are handed by copy
|
||||
* strings are passed as `&str`
|
||||
* [request values](http://byron.github.io/google-apis-rs/google_youtube3/trait.RequestValue.html) are borrowed
|
||||
* [request values](http://byron.github.io/google-apis-rs/google_youtube3/trait.RequestValue.html) are moved
|
||||
|
||||
Arguments will always be copied or cloned into the builder, to make them independent of their original life times.
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
//!
|
||||
//! * [PODs][wiki-pod] are handed by copy
|
||||
//! * strings are passed as `&str`
|
||||
//! * [request values](trait.RequestValue.html) are borrowed
|
||||
//! * [request values](trait.RequestValue.html) are moved
|
||||
//!
|
||||
//! Arguments will always be copied or cloned into the builder, to make them independent of their original life times.
|
||||
//!
|
||||
@@ -7239,7 +7239,7 @@ impl<'a, C, A> I18nLanguageListCall<'a, C, A> where C: BorrowMut<hyper::Client>,
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -7527,7 +7527,7 @@ impl<'a, C, A> ChannelBannerInsertCall<'a, C, A> where C: BorrowMut<hyper::Clien
|
||||
_ => (&mut request_value_reader as &mut io::Read, ContentType(json_mime_type.clone())),
|
||||
};
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(content_type)
|
||||
@@ -7869,7 +7869,7 @@ impl<'a, C, A> ChannelSectionListCall<'a, C, A> where C: BorrowMut<hyper::Client
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -8171,7 +8171,7 @@ impl<'a, C, A> ChannelSectionInsertCall<'a, C, A> where C: BorrowMut<hyper::Clie
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -8437,7 +8437,7 @@ impl<'a, C, A> ChannelSectionDeleteCall<'a, C, A> where C: BorrowMut<hyper::Clie
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Delete, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -8688,7 +8688,7 @@ impl<'a, C, A> ChannelSectionUpdateCall<'a, C, A> where C: BorrowMut<hyper::Clie
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -8970,7 +8970,7 @@ impl<'a, C, A> GuideCategoryListCall<'a, C, A> where C: BorrowMut<hyper::Client>
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -9255,7 +9255,7 @@ impl<'a, C, A> PlaylistInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -9575,7 +9575,7 @@ impl<'a, C, A> PlaylistListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -9865,7 +9865,7 @@ impl<'a, C, A> PlaylistDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Delete, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -10116,7 +10116,7 @@ impl<'a, C, A> PlaylistUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -10400,7 +10400,7 @@ impl<'a, C, A> ThumbnailSetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
response
|
||||
} else {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
if protocol == "simple" {
|
||||
@@ -10721,7 +10721,7 @@ impl<'a, C, A> VideoReportAbuseCall<'a, C, A> where C: BorrowMut<hyper::Client>,
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -11014,7 +11014,7 @@ impl<'a, C, A> VideoListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -11329,7 +11329,7 @@ impl<'a, C, A> VideoRateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -11558,7 +11558,7 @@ impl<'a, C, A> VideoGetRatingCall<'a, C, A> where C: BorrowMut<hyper::Client>, A
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -11786,7 +11786,7 @@ impl<'a, C, A> VideoDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: o
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Delete, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -12057,7 +12057,7 @@ impl<'a, C, A> VideoUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: o
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -12452,7 +12452,7 @@ impl<'a, C, A> VideoInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: o
|
||||
_ => (&mut request_value_reader as &mut io::Read, ContentType(json_mime_type.clone())),
|
||||
};
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(content_type)
|
||||
@@ -12861,7 +12861,7 @@ impl<'a, C, A> SubscriptionInsertCall<'a, C, A> where C: BorrowMut<hyper::Client
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -13170,7 +13170,7 @@ impl<'a, C, A> SubscriptionListCall<'a, C, A> where C: BorrowMut<hyper::Client>,
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -13468,7 +13468,7 @@ impl<'a, C, A> SubscriptionDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Delete, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -13839,7 +13839,7 @@ impl<'a, C, A> SearchListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -14296,7 +14296,7 @@ impl<'a, C, A> I18nRegionListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -14580,7 +14580,7 @@ impl<'a, C, A> CommentThreadListCall<'a, C, A> where C: BorrowMut<hyper::Client>
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -14902,7 +14902,7 @@ impl<'a, C, A> CommentThreadUpdateCall<'a, C, A> where C: BorrowMut<hyper::Clien
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -15179,7 +15179,7 @@ impl<'a, C, A> CommentThreadInsertCall<'a, C, A> where C: BorrowMut<hyper::Clien
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -15473,7 +15473,7 @@ impl<'a, C, A> LiveStreamUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>,
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -15750,7 +15750,7 @@ impl<'a, C, A> LiveStreamDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>,
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Delete, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -16022,7 +16022,7 @@ impl<'a, C, A> LiveStreamListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -16337,7 +16337,7 @@ impl<'a, C, A> LiveStreamInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>,
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -16633,7 +16633,7 @@ impl<'a, C, A> CommentInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -16881,7 +16881,7 @@ impl<'a, C, A> CommentSetModerationStatuCall<'a, C, A> where C: BorrowMut<hyper:
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -17104,7 +17104,7 @@ impl<'a, C, A> CommentDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Delete, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -17345,7 +17345,7 @@ impl<'a, C, A> CommentListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: o
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -17634,7 +17634,7 @@ impl<'a, C, A> CommentUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -17875,7 +17875,7 @@ impl<'a, C, A> CommentMarkAsSpamCall<'a, C, A> where C: BorrowMut<hyper::Client>
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -18117,7 +18117,7 @@ impl<'a, C, A> ChannelUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -18439,7 +18439,7 @@ impl<'a, C, A> ChannelListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: o
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -18755,7 +18755,7 @@ impl<'a, C, A> VideoAbuseReportReasonListCall<'a, C, A> where C: BorrowMut<hyper
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -19021,7 +19021,7 @@ impl<'a, C, A> PlaylistItemInsertCall<'a, C, A> where C: BorrowMut<hyper::Client
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -19273,7 +19273,7 @@ impl<'a, C, A> PlaylistItemDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Delete, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -19526,7 +19526,7 @@ impl<'a, C, A> PlaylistItemListCall<'a, C, A> where C: BorrowMut<hyper::Client>,
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -19828,7 +19828,7 @@ impl<'a, C, A> PlaylistItemUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -20132,7 +20132,7 @@ impl<'a, C, A> WatermarkSetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
_ => (&mut request_value_reader as &mut io::Read, ContentType(json_mime_type.clone())),
|
||||
};
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(content_type)
|
||||
@@ -20434,7 +20434,7 @@ impl<'a, C, A> WatermarkUnsetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -20689,7 +20689,7 @@ impl<'a, C, A> LiveBroadcastControlCall<'a, C, A> where C: BorrowMut<hyper::Clie
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -21011,7 +21011,7 @@ impl<'a, C, A> LiveBroadcastUpdateCall<'a, C, A> where C: BorrowMut<hyper::Clien
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -21324,7 +21324,7 @@ impl<'a, C, A> LiveBroadcastInsertCall<'a, C, A> where C: BorrowMut<hyper::Clien
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -21642,7 +21642,7 @@ impl<'a, C, A> LiveBroadcastListCall<'a, C, A> where C: BorrowMut<hyper::Client>
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -21928,7 +21928,7 @@ impl<'a, C, A> LiveBroadcastDeleteCall<'a, C, A> where C: BorrowMut<hyper::Clien
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Delete, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -22183,7 +22183,7 @@ impl<'a, C, A> LiveBroadcastTransitionCall<'a, C, A> where C: BorrowMut<hyper::C
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -22478,7 +22478,7 @@ impl<'a, C, A> LiveBroadcastBindCall<'a, C, A> where C: BorrowMut<hyper::Client>
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -22746,7 +22746,7 @@ impl<'a, C, A> CaptionDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Delete, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Delete, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -23037,7 +23037,7 @@ impl<'a, C, A> CaptionInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
_ => (&mut request_value_reader as &mut io::Read, ContentType(json_mime_type.clone())),
|
||||
};
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(content_type)
|
||||
@@ -23392,7 +23392,7 @@ impl<'a, C, A> CaptionListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: o
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -23689,7 +23689,7 @@ impl<'a, C, A> CaptionDownloadCall<'a, C, A> where C: BorrowMut<hyper::Client>,
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -23994,7 +23994,7 @@ impl<'a, C, A> CaptionUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
_ => (&mut request_value_reader as &mut io::Read, ContentType(json_mime_type.clone())),
|
||||
};
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Put, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(content_type)
|
||||
@@ -24352,7 +24352,7 @@ impl<'a, C, A> VideoCategoryListCall<'a, C, A> where C: BorrowMut<hyper::Client>
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -24649,7 +24649,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
access_token: token.access_token });
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Get, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone());
|
||||
|
||||
@@ -24961,7 +24961,7 @@ impl<'a, C, A> ActivityInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
let mut req_result = {
|
||||
let mut client = &mut *self.hub.client.borrow_mut();
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
|
||||
Reference in New Issue
Block a user