chore(regen-apis

This commit is contained in:
Sebastian Thiel
2017-05-22 21:02:08 +02:00
parent dd4bfe3de0
commit 390ce7f9d8
106 changed files with 5891 additions and 3983 deletions

View File

@@ -177,7 +177,7 @@
// 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
// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any
// unused imports in fully featured APIs. Same with unused_mut ... .
#![allow(unused_imports, unused_mut, dead_code)]
@@ -205,6 +205,7 @@ use std::collections::BTreeMap;
use serde_json as json;
use std::io;
use std::fs;
use std::mem;
use std::thread::sleep;
use std::time::Duration;
@@ -325,6 +326,8 @@ pub struct Appsactivity<C, A> {
client: RefCell<C>,
auth: RefCell<A>,
_user_agent: String,
_base_url: String,
_root_url: String,
}
impl<'a, C, A> Hub for Appsactivity<C, A> {}
@@ -337,6 +340,8 @@ impl<'a, C, A> Appsactivity<C, A>
client: RefCell::new(client),
auth: RefCell::new(authenticator),
_user_agent: "google-api-rust-client/1.0.4".to_string(),
_base_url: "https://www.googleapis.com/appsactivity/v1/".to_string(),
_root_url: "https://www.googleapis.com/".to_string(),
}
}
@@ -349,9 +354,23 @@ impl<'a, C, A> Appsactivity<C, A>
///
/// Returns the previously set user-agent.
pub fn user_agent(&mut self, agent_name: String) -> String {
let prev = self._user_agent.clone();
self._user_agent = agent_name;
prev
mem::replace(&mut self._user_agent, agent_name)
}
/// Set the base url to use in all requests to the server.
/// It defaults to `https://www.googleapis.com/appsactivity/v1/`.
///
/// Returns the previously set base url.
pub fn base_url(&mut self, new_base_url: String) -> String {
mem::replace(&mut self._base_url, new_base_url)
}
/// Set the root url to use in all requests to the server.
/// It defaults to `https://www.googleapis.com/`.
///
/// Returns the previously set root url.
pub fn root_url(&mut self, new_root_url: String) -> String {
mem::replace(&mut self._root_url, new_root_url)
}
}
@@ -756,7 +775,7 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
params.push(("alt", "json".to_string()));
let mut url = "https://www.googleapis.com/appsactivity/v1/activities".to_string();
let mut url = self.hub._base_url.clone() + "activities";
if self._scopes.len() == 0 {
self._scopes.insert(Scope::DriveMetadataReadonly.as_ref().to_string(), ());
}
@@ -940,4 +959,3 @@ impl<'a, C, A> ActivityListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
}