mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-06 19:45:20 +01:00
chore(regen-apis): Update examples
This commit is contained in:
@@ -14,6 +14,9 @@ license = "MIT"
|
||||
keywords = ["taskqueue", "google", "protocol", "web", "api"]
|
||||
|
||||
|
||||
[dev-dependencies]
|
||||
hyper-rustls = "^0.6"
|
||||
|
||||
[dependencies]
|
||||
hyper = "^ 0.10"
|
||||
mime = "^ 0.2.0"
|
||||
|
||||
@@ -78,6 +78,7 @@ google-taskqueue1_beta2 = "*"
|
||||
|
||||
```Rust
|
||||
extern crate hyper;
|
||||
extern crate hyper_rustls;
|
||||
extern crate yup_oauth2 as oauth2;
|
||||
extern crate google_taskqueue1_beta2 as taskqueue1_beta2;
|
||||
use taskqueue1_beta2::{Result, Error};
|
||||
@@ -94,9 +95,9 @@ let secret: ApplicationSecret = Default::default();
|
||||
// what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
|
||||
// retrieve them from storage.
|
||||
let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
|
||||
hyper::Client::new(),
|
||||
hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
|
||||
<MemoryStorage as Default>::default(), None);
|
||||
let mut hub = Taskqueue::new(hyper::Client::new(), auth);
|
||||
let mut hub = Taskqueue::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth);
|
||||
// You can configure optional parameters by calling the respective setters at will, and
|
||||
// execute the final call using `doit()`.
|
||||
// Values shown here are possibly random and not representative !
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
//!
|
||||
//! ```test_harness,no_run
|
||||
//! extern crate hyper;
|
||||
//! extern crate hyper_rustls;
|
||||
//! extern crate yup_oauth2 as oauth2;
|
||||
//! extern crate google_taskqueue1_beta2 as taskqueue1_beta2;
|
||||
//! use taskqueue1_beta2::{Result, Error};
|
||||
@@ -95,9 +96,9 @@
|
||||
//! // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
|
||||
//! // retrieve them from storage.
|
||||
//! let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
|
||||
//! hyper::Client::new(),
|
||||
//! hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
|
||||
//! <MemoryStorage as Default>::default(), None);
|
||||
//! let mut hub = Taskqueue::new(hyper::Client::new(), auth);
|
||||
//! let mut hub = Taskqueue::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth);
|
||||
//! // You can configure optional parameters by calling the respective setters at will, and
|
||||
//! // execute the final call using `doit()`.
|
||||
//! // Values shown here are possibly random and not representative !
|
||||
@@ -262,6 +263,7 @@ impl Default for Scope {
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate yup_oauth2 as oauth2;
|
||||
/// extern crate google_taskqueue1_beta2 as taskqueue1_beta2;
|
||||
/// use taskqueue1_beta2::{Result, Error};
|
||||
@@ -279,9 +281,9 @@ impl Default for Scope {
|
||||
/// // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
|
||||
/// // retrieve them from storage.
|
||||
/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
|
||||
/// hyper::Client::new(),
|
||||
/// hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
|
||||
/// <MemoryStorage as Default>::default(), None);
|
||||
/// let mut hub = Taskqueue::new(hyper::Client::new(), auth);
|
||||
/// let mut hub = Taskqueue::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth);
|
||||
/// // You can configure optional parameters by calling the respective setters at will, and
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
@@ -538,6 +540,7 @@ impl ResponseResult for Tasks {}
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate yup_oauth2 as oauth2;
|
||||
/// extern crate google_taskqueue1_beta2 as taskqueue1_beta2;
|
||||
///
|
||||
@@ -548,9 +551,9 @@ impl ResponseResult for Tasks {}
|
||||
///
|
||||
/// let secret: ApplicationSecret = Default::default();
|
||||
/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
|
||||
/// hyper::Client::new(),
|
||||
/// hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
|
||||
/// <MemoryStorage as Default>::default(), None);
|
||||
/// let mut hub = Taskqueue::new(hyper::Client::new(), auth);
|
||||
/// let mut hub = Taskqueue::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth);
|
||||
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
|
||||
/// // like `get(...)`
|
||||
/// // to build up your call.
|
||||
@@ -599,6 +602,7 @@ impl<'a, C, A> TaskqueueMethods<'a, C, A> {
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate yup_oauth2 as oauth2;
|
||||
/// extern crate google_taskqueue1_beta2 as taskqueue1_beta2;
|
||||
///
|
||||
@@ -609,9 +613,9 @@ impl<'a, C, A> TaskqueueMethods<'a, C, A> {
|
||||
///
|
||||
/// let secret: ApplicationSecret = Default::default();
|
||||
/// let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
|
||||
/// hyper::Client::new(),
|
||||
/// hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
|
||||
/// <MemoryStorage as Default>::default(), None);
|
||||
/// let mut hub = Taskqueue::new(hyper::Client::new(), auth);
|
||||
/// let mut hub = Taskqueue::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth);
|
||||
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
|
||||
/// // like `delete(...)`, `get(...)`, `insert(...)`, `lease(...)`, `list(...)`, `patch(...)` and `update(...)`
|
||||
/// // to build up your call.
|
||||
@@ -805,6 +809,7 @@ impl<'a, C, A> TaskMethods<'a, C, A> {
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// # extern crate hyper;
|
||||
/// # extern crate hyper_rustls;
|
||||
/// # extern crate yup_oauth2 as oauth2;
|
||||
/// # extern crate google_taskqueue1_beta2 as taskqueue1_beta2;
|
||||
/// # #[test] fn egal() {
|
||||
@@ -814,9 +819,9 @@ impl<'a, C, A> TaskMethods<'a, C, A> {
|
||||
///
|
||||
/// # let secret: ApplicationSecret = Default::default();
|
||||
/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
|
||||
/// # hyper::Client::new(),
|
||||
/// # hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
|
||||
/// # <MemoryStorage as Default>::default(), None);
|
||||
/// # let mut hub = Taskqueue::new(hyper::Client::new(), auth);
|
||||
/// # let mut hub = Taskqueue::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth);
|
||||
/// // You can configure optional parameters by calling the respective setters at will, and
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
@@ -1064,6 +1069,7 @@ impl<'a, C, A> TaskqueueGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// # extern crate hyper;
|
||||
/// # extern crate hyper_rustls;
|
||||
/// # extern crate yup_oauth2 as oauth2;
|
||||
/// # extern crate google_taskqueue1_beta2 as taskqueue1_beta2;
|
||||
/// # #[test] fn egal() {
|
||||
@@ -1073,9 +1079,9 @@ impl<'a, C, A> TaskqueueGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
///
|
||||
/// # let secret: ApplicationSecret = Default::default();
|
||||
/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
|
||||
/// # hyper::Client::new(),
|
||||
/// # hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
|
||||
/// # <MemoryStorage as Default>::default(), None);
|
||||
/// # let mut hub = Taskqueue::new(hyper::Client::new(), auth);
|
||||
/// # let mut hub = Taskqueue::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth);
|
||||
/// // You can configure optional parameters by calling the respective setters at will, and
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
@@ -1359,6 +1365,7 @@ impl<'a, C, A> TaskLeaseCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// # extern crate hyper;
|
||||
/// # extern crate hyper_rustls;
|
||||
/// # extern crate yup_oauth2 as oauth2;
|
||||
/// # extern crate google_taskqueue1_beta2 as taskqueue1_beta2;
|
||||
/// use taskqueue1_beta2::Task;
|
||||
@@ -1369,9 +1376,9 @@ impl<'a, C, A> TaskLeaseCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
||||
///
|
||||
/// # let secret: ApplicationSecret = Default::default();
|
||||
/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
|
||||
/// # hyper::Client::new(),
|
||||
/// # hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
|
||||
/// # <MemoryStorage as Default>::default(), None);
|
||||
/// # let mut hub = Taskqueue::new(hyper::Client::new(), auth);
|
||||
/// # let mut hub = Taskqueue::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth);
|
||||
/// // As the method needs a request, you would usually fill it with the desired information
|
||||
/// // into the respective structure. Some of the parts shown here might not be applicable !
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
@@ -1637,6 +1644,7 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// # extern crate hyper;
|
||||
/// # extern crate hyper_rustls;
|
||||
/// # extern crate yup_oauth2 as oauth2;
|
||||
/// # extern crate google_taskqueue1_beta2 as taskqueue1_beta2;
|
||||
/// # #[test] fn egal() {
|
||||
@@ -1646,9 +1654,9 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
///
|
||||
/// # let secret: ApplicationSecret = Default::default();
|
||||
/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
|
||||
/// # hyper::Client::new(),
|
||||
/// # hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
|
||||
/// # <MemoryStorage as Default>::default(), None);
|
||||
/// # let mut hub = Taskqueue::new(hyper::Client::new(), auth);
|
||||
/// # let mut hub = Taskqueue::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth);
|
||||
/// // You can configure optional parameters by calling the respective setters at will, and
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
@@ -1885,6 +1893,7 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// # extern crate hyper;
|
||||
/// # extern crate hyper_rustls;
|
||||
/// # extern crate yup_oauth2 as oauth2;
|
||||
/// # extern crate google_taskqueue1_beta2 as taskqueue1_beta2;
|
||||
/// use taskqueue1_beta2::Task;
|
||||
@@ -1895,9 +1904,9 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
///
|
||||
/// # let secret: ApplicationSecret = Default::default();
|
||||
/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
|
||||
/// # hyper::Client::new(),
|
||||
/// # hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
|
||||
/// # <MemoryStorage as Default>::default(), None);
|
||||
/// # let mut hub = Taskqueue::new(hyper::Client::new(), auth);
|
||||
/// # let mut hub = Taskqueue::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth);
|
||||
/// // As the method needs a request, you would usually fill it with the desired information
|
||||
/// // into the respective structure. Some of the parts shown here might not be applicable !
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
@@ -2185,6 +2194,7 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// # extern crate hyper;
|
||||
/// # extern crate hyper_rustls;
|
||||
/// # extern crate yup_oauth2 as oauth2;
|
||||
/// # extern crate google_taskqueue1_beta2 as taskqueue1_beta2;
|
||||
/// # #[test] fn egal() {
|
||||
@@ -2194,9 +2204,9 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
||||
///
|
||||
/// # let secret: ApplicationSecret = Default::default();
|
||||
/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
|
||||
/// # hyper::Client::new(),
|
||||
/// # hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
|
||||
/// # <MemoryStorage as Default>::default(), None);
|
||||
/// # let mut hub = Taskqueue::new(hyper::Client::new(), auth);
|
||||
/// # let mut hub = Taskqueue::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth);
|
||||
/// // You can configure optional parameters by calling the respective setters at will, and
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
@@ -2432,6 +2442,7 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oaut
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// # extern crate hyper;
|
||||
/// # extern crate hyper_rustls;
|
||||
/// # extern crate yup_oauth2 as oauth2;
|
||||
/// # extern crate google_taskqueue1_beta2 as taskqueue1_beta2;
|
||||
/// # #[test] fn egal() {
|
||||
@@ -2441,9 +2452,9 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oaut
|
||||
///
|
||||
/// # let secret: ApplicationSecret = Default::default();
|
||||
/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
|
||||
/// # hyper::Client::new(),
|
||||
/// # hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
|
||||
/// # <MemoryStorage as Default>::default(), None);
|
||||
/// # let mut hub = Taskqueue::new(hyper::Client::new(), auth);
|
||||
/// # let mut hub = Taskqueue::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth);
|
||||
/// // You can configure optional parameters by calling the respective setters at will, and
|
||||
/// // execute the final call using `doit()`.
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
@@ -2691,6 +2702,7 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oauth
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// # extern crate hyper;
|
||||
/// # extern crate hyper_rustls;
|
||||
/// # extern crate yup_oauth2 as oauth2;
|
||||
/// # extern crate google_taskqueue1_beta2 as taskqueue1_beta2;
|
||||
/// use taskqueue1_beta2::Task;
|
||||
@@ -2701,9 +2713,9 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oauth
|
||||
///
|
||||
/// # let secret: ApplicationSecret = Default::default();
|
||||
/// # let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
|
||||
/// # hyper::Client::new(),
|
||||
/// # hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
|
||||
/// # <MemoryStorage as Default>::default(), None);
|
||||
/// # let mut hub = Taskqueue::new(hyper::Client::new(), auth);
|
||||
/// # let mut hub = Taskqueue::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth);
|
||||
/// // As the method needs a request, you would usually fill it with the desired information
|
||||
/// // into the respective structure. Some of the parts shown here might not be applicable !
|
||||
/// // Values shown here are possibly random and not representative !
|
||||
|
||||
Reference in New Issue
Block a user