mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
chore(code-up): latest version of all code
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
[package]
|
||||
|
||||
name = "google-tasks1"
|
||||
version = "0.1.6+20141121"
|
||||
version = "0.1.7+20141121"
|
||||
authors = ["Sebastian Thiel <byronimo@gmail.com>"]
|
||||
description = "A complete library to interact with tasks (protocol v1)"
|
||||
repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/tasks1"
|
||||
@@ -15,9 +15,10 @@ keywords = ["tasks", "google", "protocol", "web", "api"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
hyper = "*"
|
||||
hyper = ">= 0.4.0"
|
||||
mime = "*"
|
||||
yup-oauth2 = "*"
|
||||
url = "*"
|
||||
serde = ">= 0.3.0"
|
||||
serde_macros = "*"
|
||||
json-tools = ">= 0.3.0"
|
||||
|
||||
@@ -5,7 +5,7 @@ DO NOT EDIT !
|
||||
-->
|
||||
The `google-tasks1` library allows access to all features of the *Google tasks* service.
|
||||
|
||||
This documentation was generated from *tasks* crate version *0.1.6+20141121*, where *20141121* is the exact revision of the *tasks:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.6*.
|
||||
This documentation was generated from *tasks* crate version *0.1.7+20141121*, where *20141121* is the exact revision of the *tasks:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.7*.
|
||||
|
||||
Everything else about the *tasks* *v1* API can be found at the
|
||||
[official documentation site](https://developers.google.com/google-apps/tasks/firstapp).
|
||||
@@ -176,7 +176,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_tasks1/trait.RequestValue.html) are borrowed
|
||||
* [request values](http://byron.github.io/google-apis-rs/google_tasks1/trait.RequestValue.html) are moved
|
||||
|
||||
Arguments will always be copied or cloned into the builder, to make them independent of their original life times.
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ pub trait Delegate {
|
||||
/// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff).
|
||||
///
|
||||
/// Return retry information.
|
||||
fn http_error(&mut self, &hyper::HttpError) -> Retry {
|
||||
fn http_error(&mut self, &hyper::Error) -> Retry {
|
||||
Retry::Abort
|
||||
}
|
||||
|
||||
@@ -173,7 +173,10 @@ pub trait Delegate {
|
||||
/// Called after we have retrieved a new upload URL for a resumable upload to store it
|
||||
/// in case we fail or cancel. That way, we can attempt to resume the upload later,
|
||||
/// see `upload_url()`.
|
||||
fn store_upload_url(&mut self, url: &str) {
|
||||
/// It will also be called with None after a successful upload, which allows the delegate
|
||||
/// to forget the URL. That way, we will not attempt to resume an upload that has already
|
||||
/// finished.
|
||||
fn store_upload_url(&mut self, url: Option<&str>) {
|
||||
let _ = url;
|
||||
}
|
||||
|
||||
@@ -247,7 +250,7 @@ impl Delegate for DefaultDelegate {}
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
/// The http connection failed
|
||||
HttpError(hyper::HttpError),
|
||||
HttpError(hyper::Error),
|
||||
|
||||
/// An attempt was made to upload a resource with size stored in field `.0`
|
||||
/// even though the maximum upload size is what is stored in field `.1`.
|
||||
@@ -290,8 +293,20 @@ impl Display for Error {
|
||||
writeln!(f, "The application's API key was not found in the configuration").ok();
|
||||
writeln!(f, "It is used as there are no Scopes defined for this method.")
|
||||
},
|
||||
Error::BadRequest(ref err)
|
||||
=> writeln!(f, "Bad Requst ({}): {}", err.error.code, err.error.message),
|
||||
Error::BadRequest(ref err) => {
|
||||
try!(writeln!(f, "Bad Requst ({}): {}", err.error.code, err.error.message));
|
||||
for err in err.error.errors.iter() {
|
||||
try!(writeln!(f, " {}: {}, {}{}",
|
||||
err.domain,
|
||||
err.message,
|
||||
err.reason,
|
||||
match &err.location {
|
||||
&Some(ref loc) => format!("@{}", loc),
|
||||
&None => String::new(),
|
||||
}));
|
||||
}
|
||||
Ok(())
|
||||
},
|
||||
Error::MissingToken(ref err) =>
|
||||
writeln!(f, "Token retrieval failed with error: {}", err),
|
||||
Error::Cancelled =>
|
||||
@@ -459,6 +474,16 @@ impl<'a> Read for MultiPartReader<'a> {
|
||||
header!{
|
||||
#[doc="The `X-Upload-Content-Type` header."]
|
||||
(XUploadContentType, "X-Upload-Content-Type") => [Mime]
|
||||
|
||||
xupload_content_type {
|
||||
test_header!(
|
||||
test1,
|
||||
vec![b"text/plain"],
|
||||
Some(HeaderField(
|
||||
vec![Mime(TopLevel::Text, SubLevel::Plain, Vec::new())]
|
||||
)));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Debug)]
|
||||
@@ -576,7 +601,7 @@ pub struct ResumableUploadHelper<'a, A: 'a> {
|
||||
impl<'a, A> ResumableUploadHelper<'a, A>
|
||||
where A: oauth2::GetToken {
|
||||
|
||||
fn query_transfer_status(&mut self) -> std::result::Result<u64, hyper::HttpResult<hyper::client::Response>> {
|
||||
fn query_transfer_status(&mut self) -> std::result::Result<u64, hyper::Result<hyper::client::Response>> {
|
||||
loop {
|
||||
match self.client.post(self.url)
|
||||
.header(UserAgent(self.user_agent.to_string()))
|
||||
@@ -612,7 +637,7 @@ impl<'a, A> ResumableUploadHelper<'a, A>
|
||||
/// returns None if operation was cancelled by delegate, or the HttpResult.
|
||||
/// It can be that we return the result just because we didn't understand the status code -
|
||||
/// caller should check for status himself before assuming it's OK to use
|
||||
pub fn upload(&mut self) -> Option<hyper::HttpResult<hyper::client::Response>> {
|
||||
pub fn upload(&mut self) -> Option<hyper::Result<hyper::client::Response>> {
|
||||
let mut start = match self.start_at {
|
||||
Some(s) => s,
|
||||
None => match self.query_transfer_status() {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// This file was generated automatically from 'src/mako/api/lib.rs.mako'
|
||||
// DO NOT EDIT !
|
||||
|
||||
//! This documentation was generated from *tasks* crate version *0.1.6+20141121*, where *20141121* is the exact revision of the *tasks:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.6*.
|
||||
//! This documentation was generated from *tasks* crate version *0.1.7+20141121*, where *20141121* is the exact revision of the *tasks:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.7*.
|
||||
//!
|
||||
//! Everything else about the *tasks* *v1* API can be found at the
|
||||
//! [official documentation site](https://developers.google.com/google-apps/tasks/firstapp).
|
||||
@@ -177,7 +177,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.
|
||||
//!
|
||||
@@ -186,7 +186,6 @@
|
||||
//! [google-go-api]: https://github.com/google/google-api-go-client
|
||||
//!
|
||||
//!
|
||||
#![feature(std_misc)]
|
||||
// Unused attributes happen thanks to defined, but unused structures
|
||||
// We don't warn about this, as depending on the API, some data structures or facilities are never used.
|
||||
// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any
|
||||
@@ -202,6 +201,7 @@ extern crate serde;
|
||||
extern crate yup_oauth2 as oauth2;
|
||||
extern crate mime;
|
||||
extern crate url;
|
||||
extern crate json_tools;
|
||||
|
||||
mod cmn;
|
||||
|
||||
@@ -332,7 +332,7 @@ impl<'a, C, A> TasksHub<C, A>
|
||||
TasksHub {
|
||||
client: RefCell::new(client),
|
||||
auth: RefCell::new(authenticator),
|
||||
_user_agent: "google-api-rust-client/0.1.6".to_string(),
|
||||
_user_agent: "google-api-rust-client/0.1.7".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@ impl<'a, C, A> TasksHub<C, A>
|
||||
}
|
||||
|
||||
/// Set the user-agent header field to use in all requests to the server.
|
||||
/// It defaults to `google-api-rust-client/0.1.6`.
|
||||
/// It defaults to `google-api-rust-client/0.1.7`.
|
||||
///
|
||||
/// Returns the previously set user-agent.
|
||||
pub fn user_agent(&mut self, agent_name: String) -> String {
|
||||
@@ -1031,7 +1031,7 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oaut
|
||||
|
||||
if params.len() > 0 {
|
||||
url.push('?');
|
||||
url.push_str(&url::form_urlencoded::serialize(params.iter().map(|t| (t.0, t.1.as_ref()))));
|
||||
url.push_str(&url::form_urlencoded::serialize(params));
|
||||
}
|
||||
|
||||
|
||||
@@ -1053,7 +1053,7 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oaut
|
||||
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());
|
||||
|
||||
@@ -1293,6 +1293,7 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
|
||||
/// Perform the operation you have build so far.
|
||||
pub fn doit(mut self) -> Result<(hyper::client::Response, Task)> {
|
||||
use json_tools::{TokenReader, Lexer, BufferType, TokenType, FilterTypedKeyValuePairs, IteratorExt};
|
||||
use std::io::{Read, Seek};
|
||||
use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location};
|
||||
let mut dd = DefaultDelegate;
|
||||
@@ -1349,11 +1350,20 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
|
||||
if params.len() > 0 {
|
||||
url.push('?');
|
||||
url.push_str(&url::form_urlencoded::serialize(params.iter().map(|t| (t.0, t.1.as_ref()))));
|
||||
url.push_str(&url::form_urlencoded::serialize(params));
|
||||
}
|
||||
|
||||
let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default());
|
||||
let mut request_value_reader = io::Cursor::new(json::to_vec(&self._request));
|
||||
let mut request_value_reader =
|
||||
{
|
||||
let json_cache = json::to_string(&self._request).unwrap();
|
||||
let mut mem_dst = io::Cursor::new(Vec::with_capacity(json_cache.len()));
|
||||
io::copy(&mut Lexer::new(json_cache.bytes(), BufferType::Span)
|
||||
.filter_key_value_by_type(TokenType::Null)
|
||||
.reader(Some(&json_cache)), &mut mem_dst).unwrap();
|
||||
mem_dst.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
mem_dst
|
||||
};
|
||||
let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap();
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
|
||||
@@ -1376,7 +1386,7 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
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()))
|
||||
@@ -1568,6 +1578,7 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
||||
|
||||
/// Perform the operation you have build so far.
|
||||
pub fn doit(mut self) -> Result<(hyper::client::Response, Task)> {
|
||||
use json_tools::{TokenReader, Lexer, BufferType, TokenType, FilterTypedKeyValuePairs, IteratorExt};
|
||||
use std::io::{Read, Seek};
|
||||
use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location};
|
||||
let mut dd = DefaultDelegate;
|
||||
@@ -1624,11 +1635,20 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
||||
|
||||
if params.len() > 0 {
|
||||
url.push('?');
|
||||
url.push_str(&url::form_urlencoded::serialize(params.iter().map(|t| (t.0, t.1.as_ref()))));
|
||||
url.push_str(&url::form_urlencoded::serialize(params));
|
||||
}
|
||||
|
||||
let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default());
|
||||
let mut request_value_reader = io::Cursor::new(json::to_vec(&self._request));
|
||||
let mut request_value_reader =
|
||||
{
|
||||
let json_cache = json::to_string(&self._request).unwrap();
|
||||
let mut mem_dst = io::Cursor::new(Vec::with_capacity(json_cache.len()));
|
||||
io::copy(&mut Lexer::new(json_cache.bytes(), BufferType::Span)
|
||||
.filter_key_value_by_type(TokenType::Null)
|
||||
.reader(Some(&json_cache)), &mut mem_dst).unwrap();
|
||||
mem_dst.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
mem_dst
|
||||
};
|
||||
let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap();
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
|
||||
@@ -1651,7 +1671,7 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
||||
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::Patch, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Patch, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -1889,7 +1909,7 @@ impl<'a, C, A> TaskClearCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
||||
|
||||
if params.len() > 0 {
|
||||
url.push('?');
|
||||
url.push_str(&url::form_urlencoded::serialize(params.iter().map(|t| (t.0, t.1.as_ref()))));
|
||||
url.push_str(&url::form_urlencoded::serialize(params));
|
||||
}
|
||||
|
||||
|
||||
@@ -1911,7 +1931,7 @@ impl<'a, C, A> TaskClearCall<'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());
|
||||
|
||||
@@ -2130,7 +2150,7 @@ impl<'a, C, A> TaskMoveCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oaut
|
||||
|
||||
if params.len() > 0 {
|
||||
url.push('?');
|
||||
url.push_str(&url::form_urlencoded::serialize(params.iter().map(|t| (t.0, t.1.as_ref()))));
|
||||
url.push_str(&url::form_urlencoded::serialize(params));
|
||||
}
|
||||
|
||||
|
||||
@@ -2152,7 +2172,7 @@ impl<'a, C, A> TaskMoveCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oaut
|
||||
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());
|
||||
|
||||
@@ -2394,7 +2414,7 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
|
||||
if params.len() > 0 {
|
||||
url.push('?');
|
||||
url.push_str(&url::form_urlencoded::serialize(params.iter().map(|t| (t.0, t.1.as_ref()))));
|
||||
url.push_str(&url::form_urlencoded::serialize(params));
|
||||
}
|
||||
|
||||
|
||||
@@ -2416,7 +2436,7 @@ impl<'a, C, A> TaskDeleteCall<'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::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());
|
||||
|
||||
@@ -2635,7 +2655,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oauth
|
||||
|
||||
if params.len() > 0 {
|
||||
url.push('?');
|
||||
url.push_str(&url::form_urlencoded::serialize(params.iter().map(|t| (t.0, t.1.as_ref()))));
|
||||
url.push_str(&url::form_urlencoded::serialize(params));
|
||||
}
|
||||
|
||||
|
||||
@@ -2657,7 +2677,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oauth
|
||||
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());
|
||||
|
||||
@@ -2840,6 +2860,7 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
|
||||
/// Perform the operation you have build so far.
|
||||
pub fn doit(mut self) -> Result<(hyper::client::Response, Task)> {
|
||||
use json_tools::{TokenReader, Lexer, BufferType, TokenType, FilterTypedKeyValuePairs, IteratorExt};
|
||||
use std::io::{Read, Seek};
|
||||
use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location};
|
||||
let mut dd = DefaultDelegate;
|
||||
@@ -2901,11 +2922,20 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
|
||||
if params.len() > 0 {
|
||||
url.push('?');
|
||||
url.push_str(&url::form_urlencoded::serialize(params.iter().map(|t| (t.0, t.1.as_ref()))));
|
||||
url.push_str(&url::form_urlencoded::serialize(params));
|
||||
}
|
||||
|
||||
let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default());
|
||||
let mut request_value_reader = io::Cursor::new(json::to_vec(&self._request));
|
||||
let mut request_value_reader =
|
||||
{
|
||||
let json_cache = json::to_string(&self._request).unwrap();
|
||||
let mut mem_dst = io::Cursor::new(Vec::with_capacity(json_cache.len()));
|
||||
io::copy(&mut Lexer::new(json_cache.bytes(), BufferType::Span)
|
||||
.filter_key_value_by_type(TokenType::Null)
|
||||
.reader(Some(&json_cache)), &mut mem_dst).unwrap();
|
||||
mem_dst.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
mem_dst
|
||||
};
|
||||
let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap();
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
|
||||
@@ -2928,7 +2958,7 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
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()))
|
||||
@@ -3155,7 +3185,7 @@ impl<'a, C, A> TasklistListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
|
||||
if params.len() > 0 {
|
||||
url.push('?');
|
||||
url.push_str(&url::form_urlencoded::serialize(params.iter().map(|t| (t.0, t.1.as_ref()))));
|
||||
url.push_str(&url::form_urlencoded::serialize(params));
|
||||
}
|
||||
|
||||
|
||||
@@ -3177,7 +3207,7 @@ impl<'a, C, A> TasklistListCall<'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());
|
||||
|
||||
@@ -3350,6 +3380,7 @@ impl<'a, C, A> TasklistUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A
|
||||
|
||||
/// Perform the operation you have build so far.
|
||||
pub fn doit(mut self) -> Result<(hyper::client::Response, TaskList)> {
|
||||
use json_tools::{TokenReader, Lexer, BufferType, TokenType, FilterTypedKeyValuePairs, IteratorExt};
|
||||
use std::io::{Read, Seek};
|
||||
use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location};
|
||||
let mut dd = DefaultDelegate;
|
||||
@@ -3405,11 +3436,20 @@ impl<'a, C, A> TasklistUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A
|
||||
|
||||
if params.len() > 0 {
|
||||
url.push('?');
|
||||
url.push_str(&url::form_urlencoded::serialize(params.iter().map(|t| (t.0, t.1.as_ref()))));
|
||||
url.push_str(&url::form_urlencoded::serialize(params));
|
||||
}
|
||||
|
||||
let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default());
|
||||
let mut request_value_reader = io::Cursor::new(json::to_vec(&self._request));
|
||||
let mut request_value_reader =
|
||||
{
|
||||
let json_cache = json::to_string(&self._request).unwrap();
|
||||
let mut mem_dst = io::Cursor::new(Vec::with_capacity(json_cache.len()));
|
||||
io::copy(&mut Lexer::new(json_cache.bytes(), BufferType::Span)
|
||||
.filter_key_value_by_type(TokenType::Null)
|
||||
.reader(Some(&json_cache)), &mut mem_dst).unwrap();
|
||||
mem_dst.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
mem_dst
|
||||
};
|
||||
let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap();
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
|
||||
@@ -3432,7 +3472,7 @@ impl<'a, C, A> TasklistUpdateCall<'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()))
|
||||
@@ -3660,7 +3700,7 @@ impl<'a, C, A> TasklistDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A
|
||||
|
||||
if params.len() > 0 {
|
||||
url.push('?');
|
||||
url.push_str(&url::form_urlencoded::serialize(params.iter().map(|t| (t.0, t.1.as_ref()))));
|
||||
url.push_str(&url::form_urlencoded::serialize(params));
|
||||
}
|
||||
|
||||
|
||||
@@ -3682,7 +3722,7 @@ impl<'a, C, A> TasklistDeleteCall<'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());
|
||||
|
||||
@@ -3841,6 +3881,7 @@ impl<'a, C, A> TasklistPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
|
||||
/// Perform the operation you have build so far.
|
||||
pub fn doit(mut self) -> Result<(hyper::client::Response, TaskList)> {
|
||||
use json_tools::{TokenReader, Lexer, BufferType, TokenType, FilterTypedKeyValuePairs, IteratorExt};
|
||||
use std::io::{Read, Seek};
|
||||
use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location};
|
||||
let mut dd = DefaultDelegate;
|
||||
@@ -3896,11 +3937,20 @@ impl<'a, C, A> TasklistPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
|
||||
if params.len() > 0 {
|
||||
url.push('?');
|
||||
url.push_str(&url::form_urlencoded::serialize(params.iter().map(|t| (t.0, t.1.as_ref()))));
|
||||
url.push_str(&url::form_urlencoded::serialize(params));
|
||||
}
|
||||
|
||||
let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default());
|
||||
let mut request_value_reader = io::Cursor::new(json::to_vec(&self._request));
|
||||
let mut request_value_reader =
|
||||
{
|
||||
let json_cache = json::to_string(&self._request).unwrap();
|
||||
let mut mem_dst = io::Cursor::new(Vec::with_capacity(json_cache.len()));
|
||||
io::copy(&mut Lexer::new(json_cache.bytes(), BufferType::Span)
|
||||
.filter_key_value_by_type(TokenType::Null)
|
||||
.reader(Some(&json_cache)), &mut mem_dst).unwrap();
|
||||
mem_dst.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
mem_dst
|
||||
};
|
||||
let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap();
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
|
||||
@@ -3923,7 +3973,7 @@ impl<'a, C, A> TasklistPatchCall<'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::Patch, url.as_ref())
|
||||
let mut req = client.borrow_mut().request(hyper::method::Method::Patch, &url)
|
||||
.header(UserAgent(self.hub._user_agent.clone()))
|
||||
.header(auth_header.clone())
|
||||
.header(ContentType(json_mime_type.clone()))
|
||||
@@ -4103,6 +4153,7 @@ impl<'a, C, A> TasklistInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A
|
||||
|
||||
/// Perform the operation you have build so far.
|
||||
pub fn doit(mut self) -> Result<(hyper::client::Response, TaskList)> {
|
||||
use json_tools::{TokenReader, Lexer, BufferType, TokenType, FilterTypedKeyValuePairs, IteratorExt};
|
||||
use std::io::{Read, Seek};
|
||||
use hyper::header::{ContentType, ContentLength, Authorization, UserAgent, Location};
|
||||
let mut dd = DefaultDelegate;
|
||||
@@ -4133,11 +4184,20 @@ impl<'a, C, A> TasklistInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A
|
||||
|
||||
if params.len() > 0 {
|
||||
url.push('?');
|
||||
url.push_str(&url::form_urlencoded::serialize(params.iter().map(|t| (t.0, t.1.as_ref()))));
|
||||
url.push_str(&url::form_urlencoded::serialize(params));
|
||||
}
|
||||
|
||||
let mut json_mime_type = mime::Mime(mime::TopLevel::Application, mime::SubLevel::Json, Default::default());
|
||||
let mut request_value_reader = io::Cursor::new(json::to_vec(&self._request));
|
||||
let mut request_value_reader =
|
||||
{
|
||||
let json_cache = json::to_string(&self._request).unwrap();
|
||||
let mut mem_dst = io::Cursor::new(Vec::with_capacity(json_cache.len()));
|
||||
io::copy(&mut Lexer::new(json_cache.bytes(), BufferType::Span)
|
||||
.filter_key_value_by_type(TokenType::Null)
|
||||
.reader(Some(&json_cache)), &mut mem_dst).unwrap();
|
||||
mem_dst.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
mem_dst
|
||||
};
|
||||
let request_size = request_value_reader.seek(io::SeekFrom::End(0)).unwrap();
|
||||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap();
|
||||
|
||||
@@ -4160,7 +4220,7 @@ impl<'a, C, A> TasklistInsertCall<'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()))
|
||||
@@ -4379,7 +4439,7 @@ impl<'a, C, A> TasklistGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: o
|
||||
|
||||
if params.len() > 0 {
|
||||
url.push('?');
|
||||
url.push_str(&url::form_urlencoded::serialize(params.iter().map(|t| (t.0, t.1.as_ref()))));
|
||||
url.push_str(&url::form_urlencoded::serialize(params));
|
||||
}
|
||||
|
||||
|
||||
@@ -4401,7 +4461,7 @@ impl<'a, C, A> TasklistGetCall<'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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user