chore(gen): regenerate apis without leading slashes

This commit is contained in:
Cristi Cobzarenco
2017-08-23 11:49:35 +01:00
committed by Sebastian Thiel
parent f835835100
commit 92c80e238e
94 changed files with 33600 additions and 10136 deletions

View File

@@ -522,9 +522,9 @@ impl<'a, C, A> ArchiveInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
let (mut url, upload_type) =
if protocol == "simple" {
(self.hub._root_url.clone() + "/upload/groups/v1/groups/{groupId}/archive", "multipart")
(self.hub._root_url.clone() + "upload/groups/v1/groups/{groupId}/archive", "multipart")
} else if protocol == "resumable" {
(self.hub._root_url.clone() + "/resumable/upload/groups/v1/groups/{groupId}/archive", "resumable")
(self.hub._root_url.clone() + "resumable/upload/groups/v1/groups/{groupId}/archive", "resumable")
} else {
unreachable!()
};
@@ -780,13 +780,20 @@ impl<'a, C, A> ArchiveInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
///
/// The `scope` will be added to a set of scopes. This is important as one can maintain access
/// tokens for more than one scope.
/// If `None` is specified, then all scopes will be removed and no default scope will be used either.
/// In that case, you have to specify your API-key using the `key` parameter (see the `param()`
/// function for details).
///
/// Usually there is more than one suitable scope to authorize an operation, some of which may
/// encompass more rights than others. For example, for listing resources, a *read-only* scope will be
/// sufficient, a read-write scope will do as well.
pub fn add_scope<T>(mut self, scope: T) -> ArchiveInsertCall<'a, C, A>
where T: AsRef<str> {
self._scopes.insert(scope.as_ref().to_string(), ());
pub fn add_scope<T, S>(mut self, scope: T) -> ArchiveInsertCall<'a, C, A>
where T: Into<Option<S>>,
S: AsRef<str> {
match scope.into() {
Some(scope) => self._scopes.insert(scope.as_ref().to_string(), ()),
None => None,
};
self
}
}