pub struct PageMethods<'a, C>where
C: 'a,{ /* private fields */ }Expand description
A builder providing access to all methods supported on page resources.
It is not used directly, but through the FactCheckTools hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_factchecktools1_alpha1 as factchecktools1_alpha1;
use factchecktools1_alpha1::{FactCheckTools, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
let secret: yup_oauth2::ApplicationSecret = Default::default();
let connector = hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_only()
.enable_http2()
.build();
let executor = hyper_util::rt::TokioExecutor::new();
let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
yup_oauth2::client::CustomHyperClientBuilder::from(
hyper_util::client::legacy::Client::builder(executor).build(connector),
),
).build().await.unwrap();
let client = hyper_util::client::legacy::Client::builder(
hyper_util::rt::TokioExecutor::new()
)
.build(
hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_or_http()
.enable_http2()
.build()
);
let mut hub = FactCheckTools::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `create(...)`, `delete(...)`, `get(...)`, `list(...)` and `update(...)`
// to build up your call.
let rb = hub.pages();Implementations§
Source§impl<'a, C> PageMethods<'a, C>
impl<'a, C> PageMethods<'a, C>
Sourcepub fn create(
&self,
request: GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage,
) -> PageCreateCall<'a, C>
pub fn create( &self, request: GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage, ) -> PageCreateCall<'a, C>
Create a builder to help you perform the following task:
Create ClaimReview markup on a page.
§Arguments
request- No description provided.
Sourcepub fn delete(&self, name: &str) -> PageDeleteCall<'a, C>
pub fn delete(&self, name: &str) -> PageDeleteCall<'a, C>
Create a builder to help you perform the following task:
Delete all ClaimReview markup on a page.
§Arguments
name- The name of the resource to delete, in the form ofpages/{page_id}.
Sourcepub fn get(&self, name: &str) -> PageGetCall<'a, C>
pub fn get(&self, name: &str) -> PageGetCall<'a, C>
Create a builder to help you perform the following task:
Get all ClaimReview markup on a page.
§Arguments
name- The name of the resource to get, in the form ofpages/{page_id}.
Sourcepub fn list(&self) -> PageListCall<'a, C>
pub fn list(&self) -> PageListCall<'a, C>
Create a builder to help you perform the following task:
List the ClaimReview markup pages for a specific URL or for an organization.
Sourcepub fn update(
&self,
request: GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage,
name: &str,
) -> PageUpdateCall<'a, C>
pub fn update( &self, request: GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage, name: &str, ) -> PageUpdateCall<'a, C>
Create a builder to help you perform the following task:
Update for all ClaimReview markup on a page Note that this is a full update. To retain the existing ClaimReview markup on a page, first perform a Get operation, then modify the returned markup, and finally call Update with the entire ClaimReview markup as the body.
§Arguments
request- No description provided.name- The name of thisClaimReviewmarkup page resource, in the form ofpages/{page_id}. Except for update requests, this field is output-only and should not be set by the user.