Struct google_dfareporting2d8::api::Dfareporting
source · pub struct Dfareporting<S> {
pub client: Client<S, Body>,
pub auth: Box<dyn GetToken>,
/* 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 google_dfareporting2d8 as dfareporting2d8;
use dfareporting2d8::{Result, Error};
use std::default::Default;
use dfareporting2d8::{Dfareporting, oauth2, hyper, hyper_rustls, chrono, FieldMask};
// Get an ApplicationSecret instance by some means. It contains the `client_id` and
// `client_secret`, among other things.
let secret: oauth2::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 = oauth2::InstalledFlowAuthenticator::builder(
secret,
oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).build().await.unwrap();
let mut hub = Dfareporting::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), 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().files_list(-55, -62)
.sort_order("Lorem")
.sort_field("gubergren")
.page_token("eos")
.max_results(-4)
.doit().await;
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::Io(_)
|Error::MissingAPIKey
|Error::MissingToken(_)
|Error::Cancelled
|Error::UploadSizeLimitExceeded(_, _)
|Error::Failure(_)
|Error::BadRequest(_)
|Error::FieldClash(_)
|Error::JsonDecodeError(_, _) => println!("{}", e),
},
Ok(res) => println!("Success: {:?}", res),
}
Fields§
§client: Client<S, Body>
§auth: Box<dyn GetToken>
Implementations§
source§impl<'a, S> Dfareporting<S>
impl<'a, S> Dfareporting<S>
pub fn new<A: 'static + GetToken>( client: Client<S, Body>, auth: A ) -> Dfareporting<S>
pub fn account_active_ad_summaries( &'a self ) -> AccountActiveAdSummaryMethods<'a, S>
pub fn account_permission_groups( &'a self ) -> AccountPermissionGroupMethods<'a, S>
pub fn account_permissions(&'a self) -> AccountPermissionMethods<'a, S>
pub fn account_user_profiles(&'a self) -> AccountUserProfileMethods<'a, S>
pub fn accounts(&'a self) -> AccountMethods<'a, S>
pub fn ads(&'a self) -> AdMethods<'a, S>
pub fn advertiser_groups(&'a self) -> AdvertiserGroupMethods<'a, S>
pub fn advertisers(&'a self) -> AdvertiserMethods<'a, S>
pub fn browsers(&'a self) -> BrowserMethods<'a, S>
pub fn campaign_creative_associations( &'a self ) -> CampaignCreativeAssociationMethods<'a, S>
pub fn campaigns(&'a self) -> CampaignMethods<'a, S>
pub fn change_logs(&'a self) -> ChangeLogMethods<'a, S>
pub fn cities(&'a self) -> CityMethods<'a, S>
pub fn connection_types(&'a self) -> ConnectionTypeMethods<'a, S>
pub fn content_categories(&'a self) -> ContentCategoryMethods<'a, S>
pub fn conversions(&'a self) -> ConversionMethods<'a, S>
pub fn countries(&'a self) -> CountryMethods<'a, S>
pub fn creative_assets(&'a self) -> CreativeAssetMethods<'a, S>
pub fn creative_field_values(&'a self) -> CreativeFieldValueMethods<'a, S>
pub fn creative_fields(&'a self) -> CreativeFieldMethods<'a, S>
pub fn creative_groups(&'a self) -> CreativeGroupMethods<'a, S>
pub fn creatives(&'a self) -> CreativeMethods<'a, S>
pub fn dimension_values(&'a self) -> DimensionValueMethods<'a, S>
pub fn directory_site_contacts(&'a self) -> DirectorySiteContactMethods<'a, S>
pub fn directory_sites(&'a self) -> DirectorySiteMethods<'a, S>
pub fn dynamic_targeting_keys(&'a self) -> DynamicTargetingKeyMethods<'a, S>
pub fn files(&'a self) -> FileMethods<'a, S>
pub fn floodlight_activities(&'a self) -> FloodlightActivityMethods<'a, S>
pub fn floodlight_activity_groups( &'a self ) -> FloodlightActivityGroupMethods<'a, S>
pub fn floodlight_configurations( &'a self ) -> FloodlightConfigurationMethods<'a, S>
pub fn inventory_items(&'a self) -> InventoryItemMethods<'a, S>
pub fn landing_pages(&'a self) -> LandingPageMethods<'a, S>
pub fn languages(&'a self) -> LanguageMethods<'a, S>
pub fn metros(&'a self) -> MetroMethods<'a, S>
pub fn mobile_carriers(&'a self) -> MobileCarrierMethods<'a, S>
pub fn operating_system_versions( &'a self ) -> OperatingSystemVersionMethods<'a, S>
pub fn operating_systems(&'a self) -> OperatingSystemMethods<'a, S>
pub fn order_documents(&'a self) -> OrderDocumentMethods<'a, S>
pub fn orders(&'a self) -> OrderMethods<'a, S>
pub fn placement_groups(&'a self) -> PlacementGroupMethods<'a, S>
pub fn placement_strategies(&'a self) -> PlacementStrategyMethods<'a, S>
pub fn placements(&'a self) -> PlacementMethods<'a, S>
pub fn platform_types(&'a self) -> PlatformTypeMethods<'a, S>
pub fn postal_codes(&'a self) -> PostalCodeMethods<'a, S>
pub fn projects(&'a self) -> ProjectMethods<'a, S>
pub fn regions(&'a self) -> RegionMethods<'a, S>
pub fn remarketing_lists(&'a self) -> RemarketingListMethods<'a, S>
pub fn reports(&'a self) -> ReportMethods<'a, S>
pub fn sites(&'a self) -> SiteMethods<'a, S>
pub fn sizes(&'a self) -> SizeMethods<'a, S>
pub fn subaccounts(&'a self) -> SubaccountMethods<'a, S>
pub fn targetable_remarketing_lists( &'a self ) -> TargetableRemarketingListMethods<'a, S>
pub fn targeting_templates(&'a self) -> TargetingTemplateMethods<'a, S>
pub fn user_profiles(&'a self) -> UserProfileMethods<'a, S>
pub fn user_role_permission_groups( &'a self ) -> UserRolePermissionGroupMethods<'a, S>
pub fn user_role_permissions(&'a self) -> UserRolePermissionMethods<'a, S>
pub fn user_roles(&'a self) -> UserRoleMethods<'a, S>
pub fn video_formats(&'a self) -> VideoFormatMethods<'a, S>
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/5.0.4
.
Returns the previously set user-agent.
Trait Implementations§
source§impl<S: Clone> Clone for Dfareporting<S>
impl<S: Clone> Clone for Dfareporting<S>
source§fn clone(&self) -> Dfareporting<S>
fn clone(&self) -> Dfareporting<S>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl<'a, S> Hub for Dfareporting<S>
Auto Trait Implementations§
impl<S> !RefUnwindSafe for Dfareporting<S>
impl<S> Send for Dfareporting<S>where
S: Send,
impl<S> Sync for Dfareporting<S>where
S: Sync,
impl<S> Unpin for Dfareporting<S>where
S: Unpin,
impl<S> !UnwindSafe for Dfareporting<S>
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