mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-13 21:19:05 +01:00
chore(regen-apis): Update examples
This commit is contained in:
@@ -14,6 +14,9 @@ license = "MIT"
|
||||
keywords = ["safebrowsing", "google", "protocol", "web", "api"]
|
||||
|
||||
|
||||
[dev-dependencies]
|
||||
hyper-rustls = "^0.6"
|
||||
|
||||
[dependencies]
|
||||
hyper = "^ 0.10"
|
||||
mime = "^ 0.2.0"
|
||||
|
||||
@@ -81,6 +81,7 @@ google-safebrowsing4 = "*"
|
||||
|
||||
```Rust
|
||||
extern crate hyper;
|
||||
extern crate hyper_rustls;
|
||||
extern crate yup_oauth2 as oauth2;
|
||||
extern crate google_safebrowsing4 as safebrowsing4;
|
||||
use safebrowsing4::{Result, Error};
|
||||
@@ -97,9 +98,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 = Safebrowsing::new(hyper::Client::new(), auth);
|
||||
let mut hub = Safebrowsing::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 !
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
//!
|
||||
//! ```test_harness,no_run
|
||||
//! extern crate hyper;
|
||||
//! extern crate hyper_rustls;
|
||||
//! extern crate yup_oauth2 as oauth2;
|
||||
//! extern crate google_safebrowsing4 as safebrowsing4;
|
||||
//! use safebrowsing4::{Result, Error};
|
||||
@@ -98,9 +99,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 = Safebrowsing::new(hyper::Client::new(), auth);
|
||||
//! let mut hub = Safebrowsing::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 !
|
||||
@@ -239,6 +240,7 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder,
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate yup_oauth2 as oauth2;
|
||||
/// extern crate google_safebrowsing4 as safebrowsing4;
|
||||
/// use safebrowsing4::{Result, Error};
|
||||
@@ -256,9 +258,9 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder,
|
||||
/// // 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 = Safebrowsing::new(hyper::Client::new(), auth);
|
||||
/// let mut hub = Safebrowsing::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 !
|
||||
@@ -880,6 +882,7 @@ impl RequestValue for FindFullHashesRequest {}
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate yup_oauth2 as oauth2;
|
||||
/// extern crate google_safebrowsing4 as safebrowsing4;
|
||||
///
|
||||
@@ -890,9 +893,9 @@ impl RequestValue for FindFullHashesRequest {}
|
||||
///
|
||||
/// 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 = Safebrowsing::new(hyper::Client::new(), auth);
|
||||
/// let mut hub = Safebrowsing::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.
|
||||
@@ -939,6 +942,7 @@ impl<'a, C, A> EncodedFullHasheMethods<'a, C, A> {
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate yup_oauth2 as oauth2;
|
||||
/// extern crate google_safebrowsing4 as safebrowsing4;
|
||||
///
|
||||
@@ -949,9 +953,9 @@ impl<'a, C, A> EncodedFullHasheMethods<'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 = Safebrowsing::new(hyper::Client::new(), auth);
|
||||
/// let mut hub = Safebrowsing::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 `find(...)`
|
||||
/// // to build up your call.
|
||||
@@ -996,6 +1000,7 @@ impl<'a, C, A> FullHasheMethods<'a, C, A> {
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate yup_oauth2 as oauth2;
|
||||
/// extern crate google_safebrowsing4 as safebrowsing4;
|
||||
///
|
||||
@@ -1006,9 +1011,9 @@ impl<'a, C, A> FullHasheMethods<'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 = Safebrowsing::new(hyper::Client::new(), auth);
|
||||
/// let mut hub = Safebrowsing::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 `fetch(...)`
|
||||
/// // to build up your call.
|
||||
@@ -1054,6 +1059,7 @@ impl<'a, C, A> ThreatListUpdateMethods<'a, C, A> {
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate yup_oauth2 as oauth2;
|
||||
/// extern crate google_safebrowsing4 as safebrowsing4;
|
||||
///
|
||||
@@ -1064,9 +1070,9 @@ impl<'a, C, A> ThreatListUpdateMethods<'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 = Safebrowsing::new(hyper::Client::new(), auth);
|
||||
/// let mut hub = Safebrowsing::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.
|
||||
@@ -1113,6 +1119,7 @@ impl<'a, C, A> EncodedUpdateMethods<'a, C, A> {
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate yup_oauth2 as oauth2;
|
||||
/// extern crate google_safebrowsing4 as safebrowsing4;
|
||||
///
|
||||
@@ -1123,9 +1130,9 @@ impl<'a, C, A> EncodedUpdateMethods<'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 = Safebrowsing::new(hyper::Client::new(), auth);
|
||||
/// let mut hub = Safebrowsing::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 `list(...)`
|
||||
/// // to build up your call.
|
||||
@@ -1165,6 +1172,7 @@ impl<'a, C, A> ThreatListMethods<'a, C, A> {
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// extern crate hyper;
|
||||
/// extern crate hyper_rustls;
|
||||
/// extern crate yup_oauth2 as oauth2;
|
||||
/// extern crate google_safebrowsing4 as safebrowsing4;
|
||||
///
|
||||
@@ -1175,9 +1183,9 @@ impl<'a, C, A> ThreatListMethods<'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 = Safebrowsing::new(hyper::Client::new(), auth);
|
||||
/// let mut hub = Safebrowsing::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 `find(...)`
|
||||
/// // to build up your call.
|
||||
@@ -1230,6 +1238,7 @@ impl<'a, C, A> ThreatMatcheMethods<'a, C, A> {
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// # extern crate hyper;
|
||||
/// # extern crate hyper_rustls;
|
||||
/// # extern crate yup_oauth2 as oauth2;
|
||||
/// # extern crate google_safebrowsing4 as safebrowsing4;
|
||||
/// # #[test] fn egal() {
|
||||
@@ -1239,9 +1248,9 @@ impl<'a, C, A> ThreatMatcheMethods<'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 = Safebrowsing::new(hyper::Client::new(), auth);
|
||||
/// # let mut hub = Safebrowsing::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 !
|
||||
@@ -1474,6 +1483,7 @@ impl<'a, C, A> EncodedFullHasheGetCall<'a, C, A> where C: BorrowMut<hyper::Clien
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// # extern crate hyper;
|
||||
/// # extern crate hyper_rustls;
|
||||
/// # extern crate yup_oauth2 as oauth2;
|
||||
/// # extern crate google_safebrowsing4 as safebrowsing4;
|
||||
/// use safebrowsing4::FindFullHashesRequest;
|
||||
@@ -1484,9 +1494,9 @@ impl<'a, C, A> EncodedFullHasheGetCall<'a, C, A> where C: BorrowMut<hyper::Clien
|
||||
///
|
||||
/// # 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 = Safebrowsing::new(hyper::Client::new(), auth);
|
||||
/// # let mut hub = Safebrowsing::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 !
|
||||
@@ -1692,6 +1702,7 @@ impl<'a, C, A> FullHasheFindCall<'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_safebrowsing4 as safebrowsing4;
|
||||
/// use safebrowsing4::FetchThreatListUpdatesRequest;
|
||||
@@ -1702,9 +1713,9 @@ impl<'a, C, A> FullHasheFindCall<'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 = Safebrowsing::new(hyper::Client::new(), auth);
|
||||
/// # let mut hub = Safebrowsing::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 !
|
||||
@@ -1909,6 +1920,7 @@ impl<'a, C, A> ThreatListUpdateFetchCall<'a, C, A> where C: BorrowMut<hyper::Cli
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// # extern crate hyper;
|
||||
/// # extern crate hyper_rustls;
|
||||
/// # extern crate yup_oauth2 as oauth2;
|
||||
/// # extern crate google_safebrowsing4 as safebrowsing4;
|
||||
/// # #[test] fn egal() {
|
||||
@@ -1918,9 +1930,9 @@ impl<'a, C, A> ThreatListUpdateFetchCall<'a, C, A> where C: BorrowMut<hyper::Cli
|
||||
///
|
||||
/// # 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 = Safebrowsing::new(hyper::Client::new(), auth);
|
||||
/// # let mut hub = Safebrowsing::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 !
|
||||
@@ -2153,6 +2165,7 @@ impl<'a, C, A> EncodedUpdateGetCall<'a, C, A> where C: BorrowMut<hyper::Client>,
|
||||
///
|
||||
/// ```test_harness,no_run
|
||||
/// # extern crate hyper;
|
||||
/// # extern crate hyper_rustls;
|
||||
/// # extern crate yup_oauth2 as oauth2;
|
||||
/// # extern crate google_safebrowsing4 as safebrowsing4;
|
||||
/// # #[test] fn egal() {
|
||||
@@ -2162,9 +2175,9 @@ impl<'a, C, A> EncodedUpdateGetCall<'a, C, A> where C: BorrowMut<hyper::Client>,
|
||||
///
|
||||
/// # 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 = Safebrowsing::new(hyper::Client::new(), auth);
|
||||
/// # let mut hub = Safebrowsing::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 !
|
||||
@@ -2339,6 +2352,7 @@ impl<'a, C, A> ThreatListListCall<'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_safebrowsing4 as safebrowsing4;
|
||||
/// use safebrowsing4::FindThreatMatchesRequest;
|
||||
@@ -2349,9 +2363,9 @@ impl<'a, C, A> ThreatListListCall<'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 = Safebrowsing::new(hyper::Client::new(), auth);
|
||||
/// # let mut hub = Safebrowsing::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