pub struct AccountMethods<'a, C>where
C: 'a,{ /* private fields */ }Expand description
A builder providing access to all methods supported on account resources.
It is not used directly, but through the Adsense hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_adsense2 as adsense2;
use adsense2::{Adsense, 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 = Adsense::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `adclients_adunits_create(...)`, `adclients_adunits_get(...)`, `adclients_adunits_get_adcode(...)`, `adclients_adunits_list(...)`, `adclients_adunits_list_linked_custom_channels(...)`, `adclients_adunits_patch(...)`, `adclients_customchannels_create(...)`, `adclients_customchannels_delete(...)`, `adclients_customchannels_get(...)`, `adclients_customchannels_list(...)`, `adclients_customchannels_list_linked_ad_units(...)`, `adclients_customchannels_patch(...)`, `adclients_get(...)`, `adclients_get_adcode(...)`, `adclients_list(...)`, `adclients_urlchannels_get(...)`, `adclients_urlchannels_list(...)`, `alerts_list(...)`, `get(...)`, `get_ad_blocking_recovery_tag(...)`, `list(...)`, `list_child_accounts(...)`, `payments_list(...)`, `policy_issues_get(...)`, `policy_issues_list(...)`, `reports_generate(...)`, `reports_generate_csv(...)`, `reports_get_saved(...)`, `reports_saved_generate(...)`, `reports_saved_generate_csv(...)`, `reports_saved_list(...)`, `sites_get(...)` and `sites_list(...)`
// to build up your call.
let rb = hub.accounts();Implementations§
Source§impl<'a, C> AccountMethods<'a, C>
impl<'a, C> AccountMethods<'a, C>
Sourcepub fn adclients_adunits_create(
&self,
request: AdUnit,
parent: &str,
) -> AccountAdclientAdunitCreateCall<'a, C>
pub fn adclients_adunits_create( &self, request: AdUnit, parent: &str, ) -> AccountAdclientAdunitCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates an ad unit. This method can be called only by a restricted set of projects, which are usually owned by AdSense for Platforms publishers. Contact your account manager if you need to use this method. Note that ad units can only be created for ad clients with an “AFC” product code. For more info see the AdClient resource. For now, this method can only be used to create DISPLAY ad units. See: https://support.google.com/adsense/answer/9183566
§Arguments
request- No description provided.parent- Required. Ad client to create an ad unit under. Format: accounts/{account}/adclients/{adclient}
Sourcepub fn adclients_adunits_get(
&self,
name: &str,
) -> AccountAdclientAdunitGetCall<'a, C>
pub fn adclients_adunits_get( &self, name: &str, ) -> AccountAdclientAdunitGetCall<'a, C>
Create a builder to help you perform the following task:
Gets an ad unit from a specified account and ad client.
§Arguments
name- Required. AdUnit to get information about. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}
Sourcepub fn adclients_adunits_get_adcode(
&self,
name: &str,
) -> AccountAdclientAdunitGetAdcodeCall<'a, C>
pub fn adclients_adunits_get_adcode( &self, name: &str, ) -> AccountAdclientAdunitGetAdcodeCall<'a, C>
Create a builder to help you perform the following task:
Gets the ad unit code for a given ad unit. For more information, see About the AdSense code and Where to place the ad code in your HTML.
§Arguments
name- Required. Name of the adunit for which to get the adcode. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}
Sourcepub fn adclients_adunits_list(
&self,
parent: &str,
) -> AccountAdclientAdunitListCall<'a, C>
pub fn adclients_adunits_list( &self, parent: &str, ) -> AccountAdclientAdunitListCall<'a, C>
Create a builder to help you perform the following task:
Lists all ad units under a specified account and ad client.
§Arguments
parent- Required. The ad client which owns the collection of ad units. Format: accounts/{account}/adclients/{adclient}
Sourcepub fn adclients_adunits_list_linked_custom_channels(
&self,
parent: &str,
) -> AccountAdclientAdunitListLinkedCustomChannelCall<'a, C>
pub fn adclients_adunits_list_linked_custom_channels( &self, parent: &str, ) -> AccountAdclientAdunitListLinkedCustomChannelCall<'a, C>
Create a builder to help you perform the following task:
Lists all the custom channels available for an ad unit.
§Arguments
parent- Required. The ad unit which owns the collection of custom channels. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}
Sourcepub fn adclients_adunits_patch(
&self,
request: AdUnit,
name: &str,
) -> AccountAdclientAdunitPatchCall<'a, C>
pub fn adclients_adunits_patch( &self, request: AdUnit, name: &str, ) -> AccountAdclientAdunitPatchCall<'a, C>
Create a builder to help you perform the following task:
Updates an ad unit. This method can be called only by a restricted set of projects, which are usually owned by AdSense for Platforms publishers. Contact your account manager if you need to use this method. For now, this method can only be used to update DISPLAY ad units. See: https://support.google.com/adsense/answer/9183566
§Arguments
request- No description provided.name- Output only. Resource name of the ad unit. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}
Sourcepub fn adclients_customchannels_create(
&self,
request: CustomChannel,
parent: &str,
) -> AccountAdclientCustomchannelCreateCall<'a, C>
pub fn adclients_customchannels_create( &self, request: CustomChannel, parent: &str, ) -> AccountAdclientCustomchannelCreateCall<'a, C>
Create a builder to help you perform the following task:
Creates a custom channel. This method can be called only by a restricted set of projects, which are usually owned by AdSense for Platforms publishers. Contact your account manager if you need to use this method.
§Arguments
request- No description provided.parent- Required. The ad client to create a custom channel under. Format: accounts/{account}/adclients/{adclient}
Sourcepub fn adclients_customchannels_delete(
&self,
name: &str,
) -> AccountAdclientCustomchannelDeleteCall<'a, C>
pub fn adclients_customchannels_delete( &self, name: &str, ) -> AccountAdclientCustomchannelDeleteCall<'a, C>
Create a builder to help you perform the following task:
Deletes a custom channel. This method can be called only by a restricted set of projects, which are usually owned by AdSense for Platforms publishers. Contact your account manager if you need to use this method.
§Arguments
name- Required. Name of the custom channel to delete. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}
Sourcepub fn adclients_customchannels_get(
&self,
name: &str,
) -> AccountAdclientCustomchannelGetCall<'a, C>
pub fn adclients_customchannels_get( &self, name: &str, ) -> AccountAdclientCustomchannelGetCall<'a, C>
Create a builder to help you perform the following task:
Gets information about the selected custom channel.
§Arguments
name- Required. Name of the custom channel. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}
Sourcepub fn adclients_customchannels_list(
&self,
parent: &str,
) -> AccountAdclientCustomchannelListCall<'a, C>
pub fn adclients_customchannels_list( &self, parent: &str, ) -> AccountAdclientCustomchannelListCall<'a, C>
Create a builder to help you perform the following task:
Lists all the custom channels available in an ad client.
§Arguments
parent- Required. The ad client which owns the collection of custom channels. Format: accounts/{account}/adclients/{adclient}
Sourcepub fn adclients_customchannels_list_linked_ad_units(
&self,
parent: &str,
) -> AccountAdclientCustomchannelListLinkedAdUnitCall<'a, C>
pub fn adclients_customchannels_list_linked_ad_units( &self, parent: &str, ) -> AccountAdclientCustomchannelListLinkedAdUnitCall<'a, C>
Create a builder to help you perform the following task:
Lists all the ad units available for a custom channel.
§Arguments
parent- Required. The custom channel which owns the collection of ad units. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}
Sourcepub fn adclients_customchannels_patch(
&self,
request: CustomChannel,
name: &str,
) -> AccountAdclientCustomchannelPatchCall<'a, C>
pub fn adclients_customchannels_patch( &self, request: CustomChannel, name: &str, ) -> AccountAdclientCustomchannelPatchCall<'a, C>
Create a builder to help you perform the following task:
Updates a custom channel. This method can be called only by a restricted set of projects, which are usually owned by AdSense for Platforms publishers. Contact your account manager if you need to use this method.
§Arguments
request- No description provided.name- Output only. Resource name of the custom channel. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}
Sourcepub fn adclients_urlchannels_get(
&self,
name: &str,
) -> AccountAdclientUrlchannelGetCall<'a, C>
pub fn adclients_urlchannels_get( &self, name: &str, ) -> AccountAdclientUrlchannelGetCall<'a, C>
Create a builder to help you perform the following task:
Gets information about the selected url channel.
§Arguments
name- Required. The name of the url channel to retrieve. Format: accounts/{account}/adclients/{adclient}/urlchannels/{urlchannel}
Sourcepub fn adclients_urlchannels_list(
&self,
parent: &str,
) -> AccountAdclientUrlchannelListCall<'a, C>
pub fn adclients_urlchannels_list( &self, parent: &str, ) -> AccountAdclientUrlchannelListCall<'a, C>
Create a builder to help you perform the following task:
Lists active url channels.
§Arguments
parent- Required. The ad client which owns the collection of url channels. Format: accounts/{account}/adclients/{adclient}
Sourcepub fn adclients_get(&self, name: &str) -> AccountAdclientGetCall<'a, C>
pub fn adclients_get(&self, name: &str) -> AccountAdclientGetCall<'a, C>
Create a builder to help you perform the following task:
Gets the ad client from the given resource name.
§Arguments
name- Required. The name of the ad client to retrieve. Format: accounts/{account}/adclients/{adclient}
Sourcepub fn adclients_get_adcode(
&self,
name: &str,
) -> AccountAdclientGetAdcodeCall<'a, C>
pub fn adclients_get_adcode( &self, name: &str, ) -> AccountAdclientGetAdcodeCall<'a, C>
Create a builder to help you perform the following task:
Gets the AdSense code for a given ad client. This returns what was previously known as the ‘auto ad code’. This is only supported for ad clients with a product_code of AFC. For more information, see About the AdSense code.
§Arguments
name- Required. Name of the ad client for which to get the adcode. Format: accounts/{account}/adclients/{adclient}
Sourcepub fn adclients_list(&self, parent: &str) -> AccountAdclientListCall<'a, C>
pub fn adclients_list(&self, parent: &str) -> AccountAdclientListCall<'a, C>
Create a builder to help you perform the following task:
Lists all the ad clients available in an account.
§Arguments
parent- Required. The account which owns the collection of ad clients. Format: accounts/{account}
Sourcepub fn alerts_list(&self, parent: &str) -> AccountAlertListCall<'a, C>
pub fn alerts_list(&self, parent: &str) -> AccountAlertListCall<'a, C>
Create a builder to help you perform the following task:
Lists all the alerts available in an account.
§Arguments
parent- Required. The account which owns the collection of alerts. Format: accounts/{account}
Sourcepub fn payments_list(&self, parent: &str) -> AccountPaymentListCall<'a, C>
pub fn payments_list(&self, parent: &str) -> AccountPaymentListCall<'a, C>
Create a builder to help you perform the following task:
Lists all the payments available for an account.
§Arguments
parent- Required. The account which owns the collection of payments. Format: accounts/{account}
Sourcepub fn policy_issues_get(&self, name: &str) -> AccountPolicyIssueGetCall<'a, C>
pub fn policy_issues_get(&self, name: &str) -> AccountPolicyIssueGetCall<'a, C>
Create a builder to help you perform the following task:
Gets information about the selected policy issue.
§Arguments
name- Required. Name of the policy issue. Format: accounts/{account}/policyIssues/{policy_issue}
Sourcepub fn policy_issues_list(
&self,
parent: &str,
) -> AccountPolicyIssueListCall<'a, C>
pub fn policy_issues_list( &self, parent: &str, ) -> AccountPolicyIssueListCall<'a, C>
Create a builder to help you perform the following task:
Lists all the policy issues where the specified account is involved, both directly and through any AFP child accounts.
§Arguments
parent- Required. The account for which policy issues are being retrieved. Format: accounts/{account}
Sourcepub fn reports_saved_generate(
&self,
name: &str,
) -> AccountReportSavedGenerateCall<'a, C>
pub fn reports_saved_generate( &self, name: &str, ) -> AccountReportSavedGenerateCall<'a, C>
Create a builder to help you perform the following task:
Generates a saved report.
§Arguments
name- Required. Name of the saved report. Format: accounts/{account}/reports/{report}
Sourcepub fn reports_saved_generate_csv(
&self,
name: &str,
) -> AccountReportSavedGenerateCsvCall<'a, C>
pub fn reports_saved_generate_csv( &self, name: &str, ) -> AccountReportSavedGenerateCsvCall<'a, C>
Create a builder to help you perform the following task:
Generates a csv formatted saved report.
§Arguments
name- Required. Name of the saved report. Format: accounts/{account}/reports/{report}
Sourcepub fn reports_saved_list(
&self,
parent: &str,
) -> AccountReportSavedListCall<'a, C>
pub fn reports_saved_list( &self, parent: &str, ) -> AccountReportSavedListCall<'a, C>
Create a builder to help you perform the following task:
Lists saved reports.
§Arguments
parent- Required. The account which owns the collection of reports. Format: accounts/{account}
Sourcepub fn reports_generate(
&self,
account: &str,
) -> AccountReportGenerateCall<'a, C>
pub fn reports_generate( &self, account: &str, ) -> AccountReportGenerateCall<'a, C>
Create a builder to help you perform the following task:
Generates an ad hoc report.
§Arguments
account- Required. The account which owns the collection of reports. Format: accounts/{account}
Sourcepub fn reports_generate_csv(
&self,
account: &str,
) -> AccountReportGenerateCsvCall<'a, C>
pub fn reports_generate_csv( &self, account: &str, ) -> AccountReportGenerateCsvCall<'a, C>
Create a builder to help you perform the following task:
Generates a csv formatted ad hoc report.
§Arguments
account- Required. The account which owns the collection of reports. Format: accounts/{account}
Sourcepub fn reports_get_saved(&self, name: &str) -> AccountReportGetSavedCall<'a, C>
pub fn reports_get_saved(&self, name: &str) -> AccountReportGetSavedCall<'a, C>
Create a builder to help you perform the following task:
Gets the saved report from the given resource name.
§Arguments
name- Required. The name of the saved report to retrieve. Format: accounts/{account}/reports/{report}
Sourcepub fn sites_get(&self, name: &str) -> AccountSiteGetCall<'a, C>
pub fn sites_get(&self, name: &str) -> AccountSiteGetCall<'a, C>
Create a builder to help you perform the following task:
Gets information about the selected site.
§Arguments
name- Required. Name of the site. Format: accounts/{account}/sites/{site}
Sourcepub fn sites_list(&self, parent: &str) -> AccountSiteListCall<'a, C>
pub fn sites_list(&self, parent: &str) -> AccountSiteListCall<'a, C>
Create a builder to help you perform the following task:
Lists all the sites available in an account.
§Arguments
parent- Required. The account which owns the collection of sites. Format: accounts/{account}
Sourcepub fn get(&self, name: &str) -> AccountGetCall<'a, C>
pub fn get(&self, name: &str) -> AccountGetCall<'a, C>
Create a builder to help you perform the following task:
Gets information about the selected AdSense account.
§Arguments
name- Required. Account to get information about. Format: accounts/{account}
Sourcepub fn get_ad_blocking_recovery_tag(
&self,
name: &str,
) -> AccountGetAdBlockingRecoveryTagCall<'a, C>
pub fn get_ad_blocking_recovery_tag( &self, name: &str, ) -> AccountGetAdBlockingRecoveryTagCall<'a, C>
Create a builder to help you perform the following task:
Gets the ad blocking recovery tag of an account.
§Arguments
name- Required. The name of the account to get the tag for. Format: accounts/{account}
Sourcepub fn list(&self) -> AccountListCall<'a, C>
pub fn list(&self) -> AccountListCall<'a, C>
Create a builder to help you perform the following task:
Lists all accounts available to this user.
Sourcepub fn list_child_accounts(
&self,
parent: &str,
) -> AccountListChildAccountCall<'a, C>
pub fn list_child_accounts( &self, parent: &str, ) -> AccountListChildAccountCall<'a, C>
Create a builder to help you perform the following task:
Lists all accounts directly managed by the given AdSense account.
§Arguments
parent- Required. The parent account, which owns the child accounts. Format: accounts/{account}