pub struct Dfareporting<C, A> { /* private fields */ }Expand description
Central instance to access all Dfareporting related resource activities
§Examples
Instantiate a new hub
extern crate hyper;
extern crate hyper_rustls;
extern crate yup_oauth2 as oauth2;
extern crate google_dfareporting2d2 as dfareporting2d2;
use dfareporting2d2::{Result, Error};
use std::default::Default;
use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage};
use dfareporting2d2::Dfareporting;
// Get an ApplicationSecret instance by some means. It contains the `client_id` and
// `client_secret`, among other things.
let secret: ApplicationSecret = Default::default();
// Instantiate the authenticator. It will choose a suitable authentication flow for you,
// unless you replace `None` with the desired Flow.
// Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
// 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::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())),
<MemoryStorage as Default>::default(), None);
let mut hub = Dfareporting::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 !
let result = hub.reports().list("profileId")
.sort_order("sea")
.sort_field("nonumy")
.scope("dolores")
.page_token("gubergren")
.max_results(-95)
.doit();
match result {
Err(e) => match e {
// The Error enum provides details about what exactly happened.
// You can also just use its `Debug`, `Display` or `Error` traits
Error::HttpError(_)
|Error::MissingAPIKey
|Error::MissingToken(_)
|Error::Cancelled
|Error::UploadSizeLimitExceeded(_, _)
|Error::Failure(_)
|Error::BadRequest(_)
|Error::FieldClash(_)
|Error::JsonDecodeError(_, _) => println!("{}", e),
},
Ok(res) => println!("Success: {:?}", res),
}Implementations§
Source§impl<'a, C, A> Dfareporting<C, A>
impl<'a, C, A> Dfareporting<C, A>
pub fn new(client: C, authenticator: A) -> Dfareporting<C, A>
pub fn account_active_ad_summaries( &'a self, ) -> AccountActiveAdSummaryMethods<'a, C, A>
pub fn account_permission_groups( &'a self, ) -> AccountPermissionGroupMethods<'a, C, A>
pub fn account_permissions(&'a self) -> AccountPermissionMethods<'a, C, A>
pub fn account_user_profiles(&'a self) -> AccountUserProfileMethods<'a, C, A>
pub fn accounts(&'a self) -> AccountMethods<'a, C, A>
pub fn ads(&'a self) -> AdMethods<'a, C, A>
pub fn advertiser_groups(&'a self) -> AdvertiserGroupMethods<'a, C, A>
pub fn advertisers(&'a self) -> AdvertiserMethods<'a, C, A>
pub fn browsers(&'a self) -> BrowserMethods<'a, C, A>
pub fn campaign_creative_associations( &'a self, ) -> CampaignCreativeAssociationMethods<'a, C, A>
pub fn campaigns(&'a self) -> CampaignMethods<'a, C, A>
pub fn change_logs(&'a self) -> ChangeLogMethods<'a, C, A>
pub fn cities(&'a self) -> CityMethods<'a, C, A>
pub fn connection_types(&'a self) -> ConnectionTypeMethods<'a, C, A>
pub fn content_categories(&'a self) -> ContentCategoryMethods<'a, C, A>
pub fn countries(&'a self) -> CountryMethods<'a, C, A>
pub fn creative_assets(&'a self) -> CreativeAssetMethods<'a, C, A>
pub fn creative_field_values(&'a self) -> CreativeFieldValueMethods<'a, C, A>
pub fn creative_fields(&'a self) -> CreativeFieldMethods<'a, C, A>
pub fn creative_groups(&'a self) -> CreativeGroupMethods<'a, C, A>
pub fn creatives(&'a self) -> CreativeMethods<'a, C, A>
pub fn dimension_values(&'a self) -> DimensionValueMethods<'a, C, A>
pub fn directory_site_contacts( &'a self, ) -> DirectorySiteContactMethods<'a, C, A>
pub fn directory_sites(&'a self) -> DirectorySiteMethods<'a, C, A>
pub fn files(&'a self) -> FileMethods<'a, C, A>
pub fn floodlight_activities(&'a self) -> FloodlightActivityMethods<'a, C, A>
pub fn floodlight_activity_groups( &'a self, ) -> FloodlightActivityGroupMethods<'a, C, A>
pub fn floodlight_configurations( &'a self, ) -> FloodlightConfigurationMethods<'a, C, A>
pub fn inventory_items(&'a self) -> InventoryItemMethods<'a, C, A>
pub fn landing_pages(&'a self) -> LandingPageMethods<'a, C, A>
pub fn metros(&'a self) -> MetroMethods<'a, C, A>
pub fn mobile_carriers(&'a self) -> MobileCarrierMethods<'a, C, A>
pub fn operating_system_versions( &'a self, ) -> OperatingSystemVersionMethods<'a, C, A>
pub fn operating_systems(&'a self) -> OperatingSystemMethods<'a, C, A>
pub fn order_documents(&'a self) -> OrderDocumentMethods<'a, C, A>
pub fn orders(&'a self) -> OrderMethods<'a, C, A>
pub fn placement_groups(&'a self) -> PlacementGroupMethods<'a, C, A>
pub fn placement_strategies(&'a self) -> PlacementStrategyMethods<'a, C, A>
pub fn placements(&'a self) -> PlacementMethods<'a, C, A>
pub fn platform_types(&'a self) -> PlatformTypeMethods<'a, C, A>
pub fn postal_codes(&'a self) -> PostalCodeMethods<'a, C, A>
pub fn projects(&'a self) -> ProjectMethods<'a, C, A>
pub fn regions(&'a self) -> RegionMethods<'a, C, A>
pub fn remarketing_lists(&'a self) -> RemarketingListMethods<'a, C, A>
pub fn reports(&'a self) -> ReportMethods<'a, C, A>
pub fn sites(&'a self) -> SiteMethods<'a, C, A>
pub fn sizes(&'a self) -> SizeMethods<'a, C, A>
pub fn subaccounts(&'a self) -> SubaccountMethods<'a, C, A>
pub fn targetable_remarketing_lists( &'a self, ) -> TargetableRemarketingListMethods<'a, C, A>
pub fn user_profiles(&'a self) -> UserProfileMethods<'a, C, A>
pub fn user_role_permission_groups( &'a self, ) -> UserRolePermissionGroupMethods<'a, C, A>
pub fn user_role_permissions(&'a self) -> UserRolePermissionMethods<'a, C, A>
pub fn user_roles(&'a self) -> UserRoleMethods<'a, C, A>
Sourcepub fn user_agent(&mut self, agent_name: String) -> String
pub fn user_agent(&mut self, agent_name: String) -> String
Set the user-agent header field to use in all requests to the server.
It defaults to google-api-rust-client/1.0.6.
Returns the previously set user-agent.
Trait Implementations§
impl<'a, C, A> Hub for Dfareporting<C, A>
Auto Trait Implementations§
impl<C, A> !Freeze for Dfareporting<C, A>
impl<C, A> !RefUnwindSafe for Dfareporting<C, A>
impl<C, A> Send for Dfareporting<C, A>
impl<C, A> !Sync for Dfareporting<C, A>
impl<C, A> Unpin for Dfareporting<C, A>
impl<C, A> UnwindSafe for Dfareporting<C, A>where
C: UnwindSafe,
A: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more