Skip to main content

AdManagerService

Struct AdManagerService 

Source
pub struct AdManagerService { /* private fields */ }
Available on crate feature ad-manager only.
Expand description

Typed access to the ad-manager API v2 surface (94 operations). Obtained via Ghl::ad_manager.

Implementations§

Source§

impl AdManagerService

Source

pub async fn get_ad_accounts( &self, params: &GetAdAccountsParams, ) -> Result<Value>

Get ad accounts

Retrieve Facebook ad accounts available for the connected user

GET /ad-publishing/facebook/ad-accounts

Requires scope: adPublishing.readonly.

Source

pub async fn delete_ad_account( &self, ad_account_id: &str, body: &LocationIdBodyDTO, ) -> Result<Value>

Delete ad account

Remove a Facebook ad account connection from a location

DELETE /ad-publishing/facebook/ad-accounts/{adAccountId}

Requires scope: adPublishing.write.

Source

pub async fn get_ad_account_details( &self, ad_account_id: &str, params: &GetAdAccountDetailsParams, ) -> Result<Value>

Get ad account details

Retrieve details of a specific Facebook ad account

GET /ad-publishing/facebook/ad-accounts/{adAccountId}

Requires scope: adPublishing.readonly.

Source

pub async fn upsert_ad(&self, body: &UpsertAdDTO) -> Result<Value>

Upsert ad

Create or update a Facebook ad (v2)

PUT /ad-publishing/facebook/ads-v2

Requires scope: adPublishing.write.

Source

pub async fn delete_ad( &self, ad_id: &str, body: &LocationIdBodyDTO, ) -> Result<Value>

Delete ad

Delete a Facebook ad by ID

DELETE /ad-publishing/facebook/ads/{adId}

Requires scope: adPublishing.write.

Source

pub async fn duplicate_ad(&self, ad_id: &str) -> Result<Value>

Duplicate ad

Duplicate an existing Facebook ad

POST /ad-publishing/facebook/ads/{adId}/duplicate

Requires scope: adPublishing.write.

Source

pub async fn pause_ad( &self, ad_id: &str, body: &LocationIdBodyDTO, ) -> Result<Value>

Pause ad

Pause a running Facebook ad

POST /ad-publishing/facebook/ads/{adId}/pause

Requires scope: adPublishing.write.

Source

pub async fn resume_ad( &self, ad_id: &str, body: &LocationIdBodyDTO, ) -> Result<Value>

Resume ad

Resume a paused Facebook ad

POST /ad-publishing/facebook/ads/{adId}/resume

Requires scope: adPublishing.write.

Source

pub async fn upsert_adset(&self, body: &UpsertAdsetDTO) -> Result<Value>

Upsert adset

Create or update a Facebook ad set

PUT /ad-publishing/facebook/adsets

Requires scope: adPublishing.write.

Source

pub async fn delete_ad_set( &self, adset_id: &str, body: &LocationIdBodyDTO, ) -> Result<Value>

Delete ad set

Delete a Facebook ad set by ID

DELETE /ad-publishing/facebook/adsets/{adsetId}

Requires scope: adPublishing.write.

Source

pub async fn duplicate_ad_set(&self, adset_id: &str) -> Result<Value>

Duplicate ad set

Duplicate an existing Facebook ad set

POST /ad-publishing/facebook/adsets/{adsetId}/duplicate

Requires scope: adPublishing.write.

Source

pub async fn pause_ad_set( &self, adset_id: &str, body: &LocationIdBodyDTO, ) -> Result<Value>

Pause ad set

Pause a running Facebook ad set

POST /ad-publishing/facebook/adsets/{adsetId}/pause

Requires scope: adPublishing.write.

Source

pub async fn resume_ad_set( &self, adset_id: &str, body: &LocationIdBodyDTO, ) -> Result<Value>

Resume ad set

Resume a paused Facebook ad set

POST /ad-publishing/facebook/adsets/{adsetId}/resume

Requires scope: adPublishing.write.

Source

pub async fn get_campaign_with_linked_entities( &self, campaign_id: &str, params: &GetCampaignWithLinkedEntitiesParams, ) -> Result<Value>

Get campaign with linked entities

Retrieve a Facebook campaign with its linked adsets and ads

GET /ad-publishing/facebook/campaign/{campaignId}

Requires scope: adPublishing.readonly.

Source

pub async fn upsert_campaign(&self, body: &UpsertCampaignDTO) -> Result<Value>

Upsert campaign

Create or update a Facebook campaign

PUT /ad-publishing/facebook/campaigns

Requires scope: adPublishing.write.

Source

pub async fn delete_campaign( &self, campaign_id: &str, body: &LocationIdBodyDTO, ) -> Result<Value>

Delete campaign

Delete a Facebook campaign by ID

DELETE /ad-publishing/facebook/campaigns/{campaignId}

Requires scope: adPublishing.write.

Source

pub async fn duplicate_campaign( &self, campaign_id: &str, body: &LocationIdBodyDTO, ) -> Result<Value>

Duplicate campaign

Duplicate an existing Facebook campaign

POST /ad-publishing/facebook/campaigns/{campaignId}/duplicate

Requires scope: adPublishing.write.

Source

pub async fn pause_campaign( &self, campaign_id: &str, body: &LocationIdBodyDTO, ) -> Result<Value>

Pause campaign

Pause a running Facebook campaign

POST /ad-publishing/facebook/campaigns/{campaignId}/pause

Requires scope: adPublishing.write.

Source

pub async fn publish_campaign( &self, campaign_id: &str, body: &PublishAdDTO, ) -> Result<Value>

Publish campaign

Publish a Facebook campaign and push it live to Facebook

POST /ad-publishing/facebook/campaigns/{campaignId}/publish

Requires scope: adPublishing.write.

Source

pub async fn resume_campaign( &self, campaign_id: &str, body: &LocationIdBodyDTO, ) -> Result<Value>

Resume campaign

Resume a paused Facebook campaign

POST /ad-publishing/facebook/campaigns/{campaignId}/resume

Requires scope: adPublishing.write.

Source

pub async fn get_conversation_forms( &self, params: &GetConversationFormsParams, ) -> Result<Value>

Get conversation forms

Retrieve Facebook conversation lead forms for a location

GET /ad-publishing/facebook/conversation-forms

Requires scope: adPublishing.readonly.

Source

pub async fn create_conversation_form( &self, body: &CreateConversationFormDTO, ) -> Result<Value>

Create conversation form

Create a new Facebook conversation lead form

POST /ad-publishing/facebook/conversation-forms

Requires scope: adPublishing.write.

Source

pub async fn get_custom_audiences( &self, params: &GetCustomAudiencesParams, ) -> Result<Value>

Get custom audiences

Retrieve Facebook custom audiences for a location

GET /ad-publishing/facebook/custom-audience

Requires scope: adPublishing.readonly.

Source

pub async fn delete_custom_audience( &self, audience_id: &str, params: &DeleteCustomAudienceParams, ) -> Result<Value>

Delete custom audience

Delete a Facebook custom audience by ID

DELETE /ad-publishing/facebook/custom-audience/{audienceId}

Requires scope: adPublishing.write.

Source

pub async fn get_custom_audience_by_id( &self, audience_id: &str, params: &GetCustomAudienceByIdParams, ) -> Result<Value>

Get custom audience by ID

Retrieve a specific Facebook custom audience by its ID

GET /ad-publishing/facebook/custom-audience/{audienceId}

Requires scope: adPublishing.readonly.

Source

pub async fn update_custom_audience( &self, audience_id: &str, body: &FbUpdateAudienceBodyDTO, ) -> Result<Value>

Update custom audience

Update name or description of a Facebook custom audience

PUT /ad-publishing/facebook/custom-audience/{audienceId}

Requires scope: adPublishing.write.

Source

pub async fn remove_custom_audience_member( &self, audience_id: &str, body: &UpdateCustomAudienceDTO, ) -> Result<Value>

Remove custom audience member

Remove a member from a Facebook custom audience

DELETE /ad-publishing/facebook/custom-audience/{audienceId}/member

Requires scope: adPublishing.write.

Source

pub async fn add_custom_audience_member( &self, audience_id: &str, body: &UpdateCustomAudienceDTO, ) -> Result<Value>

Add custom audience member

Add a member to a Facebook custom audience

PUT /ad-publishing/facebook/custom-audience/{audienceId}/member

Requires scope: adPublishing.write.

Source

pub async fn batch_update_audience_members( &self, audience_id: &str, body: &UpdateCustomAudienceBatchDTO, ) -> Result<Value>

Batch update audience members

Add or remove members in bulk from a Facebook custom audience via CSV or smart lists

PUT /ad-publishing/facebook/custom-audience/{audienceId}/member/batch

Requires scope: adPublishing.write.

Source

pub async fn get_entities(&self, params: &GetEntitiesParams) -> Result<Value>

Get entities

Retrieve Facebook campaigns, adsets, or ads based on entity type

GET /ad-publishing/facebook/entity

Requires scope: adPublishing.readonly.

Source

pub async fn delete_facebook_integration( &self, body: &LocationIdBodyDTO, ) -> Result<Value>

Delete Facebook integration

Remove the Facebook ad integration from a location

DELETE /ad-publishing/facebook/integration

Requires scope: adPublishing.write.

Source

pub async fn get_facebook_integration( &self, params: &GetFacebookIntegrationParams, ) -> Result<Value>

Get Facebook integration

Retrieve the Facebook ad integration details for a location

GET /ad-publishing/facebook/integration

Requires scope: adPublishing.readonly.

Source

pub async fn create_facebook_integration( &self, body: &CreateIntegrationDTO, ) -> Result<Value>

Create Facebook integration

Create a Facebook ad integration for a location with page and ad account

POST /ad-publishing/facebook/integration

Requires scope: adPublishing.write.

Source

pub async fn get_lead_form_by_id( &self, lead_form_id: &str, params: &GetLeadFormByIdParams, ) -> Result<Value>

Get lead form by ID

Retrieve a specific Facebook lead form by its ID

GET /ad-publishing/facebook/lead-form/{leadFormId}

Requires scope: adPublishing.readonly.

Source

pub async fn get_current_facebook_user( &self, params: &GetCurrentFacebookUserParams, ) -> Result<Value>

Get current Facebook user

Retrieve the authenticated Facebook user profile for a location

GET /ad-publishing/facebook/me

Requires scope: adPublishing.readonly.

Source

pub async fn delete_page_connection( &self, params: &DeletePageConnectionParams, ) -> Result<Value>

Delete page connection

Remove a Facebook page connection from a location

DELETE /ad-publishing/facebook/page

Requires scope: adPublishing.write.

Source

pub async fn set_default_page( &self, params: &SetDefaultPageParams, body: &FbSetDefaultPageBodyDTO, ) -> Result<Value>

Set default page

Set the default Facebook page for a location

PUT /ad-publishing/facebook/page/default

Requires scope: adPublishing.write.

Source

pub async fn get_page_lead_forms( &self, page_id: &str, params: &GetPageLeadFormsParams, ) -> Result<Value>

Get page lead forms

Retrieve lead gen forms for a specific Facebook page

GET /ad-publishing/facebook/page/{pageId}/forms

Requires scope: adPublishing.readonly.

Source

pub async fn create_page_lead_form( &self, page_id: &str, body: &CreateLeadFormDTO, ) -> Result<Value>

Create page lead form

Create a new lead gen form on a Facebook page

POST /ad-publishing/facebook/page/{pageId}/forms

Requires scope: adPublishing.write.

Source

pub async fn get_instagram_accounts_for_page( &self, page_id: &str, params: &GetInstagramAccountsForPageParams, ) -> Result<Value>

Get Instagram accounts for page

Retrieve Instagram accounts linked to a specific Facebook page

GET /ad-publishing/facebook/page/{pageId}/instagram

Requires scope: adPublishing.readonly.

Source

pub async fn get_facebook_pages( &self, params: &GetFacebookPagesParams, ) -> Result<Value>

Get Facebook pages

Retrieve Facebook pages associated with the connected account

GET /ad-publishing/facebook/pages

Requires scope: adPublishing.readonly.

Source

pub async fn get_conversion_pixels( &self, params: &GetConversionPixelsParams, ) -> Result<Value>

Get conversion pixels

Retrieve Facebook conversion pixels for a location

GET /ad-publishing/facebook/pixels

Requires scope: adPublishing.readonly.

Source

pub async fn upsert_conversion_pixel( &self, body: &UpsertConversionPixelDTO, ) -> Result<Value>

Upsert conversion pixel

Create or update a Facebook conversion pixel configuration

PUT /ad-publishing/facebook/pixels

Requires scope: adPublishing.write.

Source

pub async fn get_reporting_data( &self, params: &GetReportingDataParams, ) -> Result<Value>

Get reporting data

Retrieve aggregated Facebook ad reporting metrics for a location

GET /ad-publishing/facebook/reporting

Requires scope: adPublishing.readonly.

Source

pub async fn get_campaign_reporting( &self, campaign_id: &str, params: &GetCampaignReportingParams, ) -> Result<Value>

Get campaign reporting

Retrieve reporting metrics for a specific Facebook campaign

GET /ad-publishing/facebook/reporting/campaign/{campaignId}

Requires scope: adPublishing.readonly.

Source

pub async fn get_reporting_list( &self, params: &GetReportingListParams, ) -> Result<Value>

Get reporting list

Retrieve a list of Facebook campaigns, adsets, or ads with reporting data

GET /ad-publishing/facebook/reporting/list

Requires scope: adPublishing.readonly.

Source

pub async fn search_targeting_options( &self, params: &SearchTargetingOptionsParams, ) -> Result<Value>

Search targeting options

Search Facebook geo-locations and interests for ad targeting

GET /ad-publishing/facebook/targeting/search

Source

pub async fn get_google_ad_accounts( &self, params: &GetGoogleAdAccountsParams, ) -> Result<Value>

Get Google ad accounts

Retrieve Google Ads accounts available for the connected user

GET /ad-publishing/google/ad-accounts

Requires scope: adPublishing.readonly.

Source

pub async fn delete_ad_account_op( &self, ad_account_id: &str, body: &LocationIdBodyDTO, ) -> Result<Value>

Delete ad account

Remove a Google Ads account connection from a location

DELETE /ad-publishing/google/ad-accounts/{adAccountId}

Requires scope: adPublishing.write.

Source

pub async fn get_ad_account_details_op( &self, ad_account_id: &str, params: &GetAdAccountDetailsOpParams, ) -> Result<Value>

Get ad account details

Retrieve details of a specific Google Ads account

GET /ad-publishing/google/ad-accounts/{adAccountId}

Requires scope: adPublishing.readonly.

Source

pub async fn upsert_google_campaign(&self, body: &CampaignDTO) -> Result<Value>

Upsert Google campaign

Create or update a full Google Ads campaign structure

PUT /ad-publishing/google/ads

Requires scope: adPublishing.write.

Source

pub async fn get_google_campaign_by_id( &self, ad_id: &str, params: &GetGoogleCampaignByIdParams, ) -> Result<Value>

Get Google campaign by ID

Retrieve a specific Google Ads campaign by ID

GET /ad-publishing/google/ads/{adId}

Requires scope: adPublishing.readonly.

Source

pub async fn publish_ad(&self, ad_id: &str) -> Result<Value>

Publish ad

Publish a Google ad and push it live

POST /ad-publishing/google/ads/{adId}/publish

Requires scope: adPublishing.write.

Source

pub async fn get_assets(&self, params: &GetAssetsParams) -> Result<Value>

Get assets

Retrieve Google Ads creative assets for a location

GET /ad-publishing/google/assets

Requires scope: adPublishing.readonly.

Source

pub async fn upsert_assets(&self, body: &UpsertAssetsDTO) -> Result<Value>

Upsert assets

Create or update Google Ads creative assets

POST /ad-publishing/google/assets

Requires scope: adPublishing.write.

Source

pub async fn get_audiences(&self, params: &GetAudiencesParams) -> Result<Value>

Get audiences

Retrieve Google Ads combined audiences for a location

GET /ad-publishing/google/audiences

Requires scope: adPublishing.readonly.

Source

pub async fn upsert_audience(&self, body: &UpsertAudienceDTO) -> Result<Value>

Upsert audience

Create or update a Google Ads combined audience

PUT /ad-publishing/google/audiences

Requires scope: adPublishing.write.

Source

pub async fn get_audience_by_id( &self, audience_id: &str, params: &GetAudienceByIdParams, ) -> Result<Value>

Get audience by ID

Retrieve a specific Google Ads combined audience by ID

GET /ad-publishing/google/audiences/{audienceId}

Requires scope: adPublishing.readonly.

Source

pub async fn get_conversion_goals( &self, params: &GetConversionGoalsParams, ) -> Result<Value>

Get conversion goals

Retrieve Google Ads conversion goals for a location

GET /ad-publishing/google/conversion-goals

Requires scope: adPublishing.readonly.

Source

pub async fn get_conversions( &self, params: &GetConversionsParams, ) -> Result<Value>

Get conversions

Retrieve Google Ads conversion actions for a location

GET /ad-publishing/google/conversions

Requires scope: adPublishing.readonly.

Source

pub async fn upsert_conversion( &self, body: &UpsertConversionDTO, ) -> Result<Value>

Upsert conversion

Create or update a Google Ads conversion action

PUT /ad-publishing/google/conversions

Requires scope: adPublishing.write.

Source

pub async fn delete_conversion( &self, conversion_id: &str, params: &DeleteConversionParams, ) -> Result<Value>

Delete conversion

Delete a Google Ads conversion action by ID

DELETE /ad-publishing/google/conversions/{conversionId}

Requires scope: adPublishing.write.

Source

pub async fn get_conversion_by_id( &self, conversion_id: &str, params: &GetConversionByIdParams, ) -> Result<Value>

Get conversion by ID

Retrieve a specific Google Ads conversion action by ID

GET /ad-publishing/google/conversions/{conversionId}

Requires scope: adPublishing.readonly.

Source

pub async fn get_entities_op( &self, params: &GetEntitiesOpParams, ) -> Result<Value>

Get entities

Retrieve Google campaigns, ad groups, or ads based on entity type

GET /ad-publishing/google/entity

Requires scope: adPublishing.readonly.

Source

pub async fn get_google_integration( &self, params: &GetGoogleIntegrationParams, ) -> Result<Value>

Get Google integration

Retrieve the Google Ads integration details for a location

GET /ad-publishing/google/integration

Requires scope: adPublishing.readonly.

Source

pub async fn create_google_integration( &self, body: &CreateGoogleIntegrationDTO, ) -> Result<Value>

Create Google integration

Create a Google Ads integration for a location

POST /ad-publishing/google/integration

Requires scope: adPublishing.write.

Source

pub async fn get_keyword_ideas( &self, params: &GetKeywordIdeasParams, body: &KeywordSuggestionDTO, ) -> Result<Value>

Get keyword ideas

Retrieve keyword suggestions for Google Ads campaigns

POST /ad-publishing/google/keyword-ideas

Requires scope: adPublishing.readonly.

Source

pub async fn get_current_google_user( &self, params: &GetCurrentGoogleUserParams, ) -> Result<Value>

Get current Google user

Retrieve the authenticated Google user info for a location

GET /ad-publishing/google/me

Requires scope: adPublishing.readonly.

Source

pub async fn get_reporting_data_op( &self, params: &GetReportingDataOpParams, ) -> Result<Value>

Get reporting data

Retrieve aggregated Google Ads reporting metrics for a location

GET /ad-publishing/google/reporting

Requires scope: adPublishing.readonly.

Source

pub async fn get_campaign_reporting_op( &self, campaign_id: &str, params: &GetCampaignReportingOpParams, ) -> Result<Value>

Get campaign reporting

Retrieve reporting metrics for a specific Google campaign

GET /ad-publishing/google/reporting/campaign/{campaignId}

Requires scope: adPublishing.readonly.

Source

pub async fn get_reporting_list_op( &self, params: &GetReportingListOpParams, ) -> Result<Value>

Get reporting list

Retrieve a list of Google campaigns or ad groups with reporting data

GET /ad-publishing/google/reporting/list

Requires scope: adPublishing.readonly.

Source

pub async fn get_segments(&self, params: &GetSegmentsParams) -> Result<Value>

Get segments

Retrieve Google Ads audience segments for a location

GET /ad-publishing/google/segments

Requires scope: adPublishing.readonly.

Source

pub async fn upsert_segment( &self, params: &UpsertSegmentParams, body: &UpsertSegmentDTO, ) -> Result<Value>

Upsert segment

Create or update a Google Ads audience segment

PUT /ad-publishing/google/segments

Requires scope: adPublishing.write.

Source

pub async fn create_offline_user_list_job( &self, body: &CreateOfflineUserListJobDTO, ) -> Result<Value>

Create offline user list job

Create a job to upload users to a Google customer match list

POST /ad-publishing/google/segments/offline-user-list-job

Requires scope: adPublishing.write.

Source

pub async fn delete_segment( &self, segment_id: &str, params: &DeleteSegmentParams, ) -> Result<Value>

Delete segment

Delete a Google Ads audience segment by ID

DELETE /ad-publishing/google/segments/{segmentId}

Requires scope: adPublishing.write.

Source

pub async fn get_segment_by_id( &self, segment_id: &str, params: &GetSegmentByIdParams, ) -> Result<Value>

Get segment by ID

Retrieve a specific Google Ads audience segment by ID

GET /ad-publishing/google/segments/{segmentId}

Requires scope: adPublishing.readonly.

Source

pub async fn get_target_interests( &self, params: &GetTargetInterestsParams, ) -> Result<Value>

Get target interests

Retrieve affinity and in-market audience options for Google Ads targeting

GET /ad-publishing/google/target-interests

Requires scope: adPublishing.readonly.

Source

pub async fn search_targeting_options_op( &self, params: &SearchTargetingOptionsOpParams, ) -> Result<Value>

Search targeting options

Search Google geo-locations for ad targeting

GET /ad-publishing/google/targeting/search

Requires scope: adPublishing.readonly.

Source

pub async fn delete_ad_account_op2( &self, params: &DeleteAdAccountOp2Params, ) -> Result<Value>

Delete ad account

Remove a LinkedIn ad account connection from a location

DELETE /ad-publishing/linkedin/ad-account

Requires scope: adPublishing.write.

Source

pub async fn get_ad_account_details_op2( &self, params: &GetAdAccountDetailsOp2Params, ) -> Result<Value>

Get ad account details

Retrieve details of a specific LinkedIn ad account

GET /ad-publishing/linkedin/ad-account

Requires scope: adPublishing.readonly.

Source

pub async fn get_linked_in_ad_accounts( &self, params: &GetLinkedInAdAccountsParams, ) -> Result<Value>

Get LinkedIn ad accounts

Retrieve LinkedIn Ads accounts available for the connected user

GET /ad-publishing/linkedin/ad-accounts

Requires scope: adPublishing.readonly.

Source

pub async fn upsert_ad_campaign_group( &self, body: &AdCampaignGroupDataDTO, ) -> Result<Value>

Upsert ad campaign group

Create or update a LinkedIn ad campaign group with campaigns and ads

PUT /ad-publishing/linkedin/ads

Requires scope: adPublishing.write.

Source

pub async fn get_ad_campaign_group( &self, ad_id: &str, params: &GetAdCampaignGroupParams, ) -> Result<Value>

Get ad campaign group

Retrieve a LinkedIn ad campaign group by ID

GET /ad-publishing/linkedin/ads/{adId}

Requires scope: adPublishing.readonly.

Source

pub async fn publish_ad_campaign_group( &self, ad_id: &str, body: &LocationIdBodyDTO, ) -> Result<Value>

Publish ad campaign group

Publish a LinkedIn ad campaign group and push it live

POST /ad-publishing/linkedin/ads/{adId}/publish

Requires scope: adPublishing.write.

Source

pub async fn get_linked_in_integration( &self, params: &GetLinkedInIntegrationParams, ) -> Result<Value>

Get LinkedIn integration

Retrieve the LinkedIn Ads integration details for a location

GET /ad-publishing/linkedin/integration

Requires scope: adPublishing.readonly.

Source

pub async fn create_linked_in_integration( &self, body: &CreateLinkedinIntegrationDTO, ) -> Result<Value>

Create LinkedIn integration

Create a LinkedIn Ads integration for a location with ad account details

POST /ad-publishing/linkedin/integration

Requires scope: adPublishing.write.

Source

pub async fn get_current_linked_in_user( &self, params: &GetCurrentLinkedInUserParams, ) -> Result<Value>

Get current LinkedIn user

Retrieve the authenticated LinkedIn user info for a location

GET /ad-publishing/linkedin/me

Requires scope: adPublishing.readonly.

Source

pub async fn get_ad_analytics( &self, params: &GetAdAnalyticsParams, ) -> Result<Value>

Get ad analytics

Retrieve LinkedIn Ads analytics data with configurable pivot and time grouping

GET /ad-publishing/linkedin/reporting

Requires scope: adPublishing.readonly.

Source

pub async fn get_campaign_group_reporting( &self, campaign_group_id: &str, params: &GetCampaignGroupReportingParams, ) -> Result<Value>

Get campaign group reporting

Retrieve reporting metrics for a specific LinkedIn campaign group

GET /ad-publishing/linkedin/reporting/campaign-group/{campaignGroupId}

Requires scope: adPublishing.readonly.

Source

pub async fn get_reporting_list_op2( &self, params: &GetReportingListOp2Params, ) -> Result<Value>

Get reporting list

Retrieve a list of LinkedIn campaigns or campaign groups with reporting data

GET /ad-publishing/linkedin/reporting/list

Requires scope: adPublishing.readonly.

Source

pub async fn search_targeting_options_op2( &self, params: &SearchTargetingOptionsOp2Params, ) -> Result<Value>

Search targeting options

Search LinkedIn targeting facets such as locations, industries, and job titles

GET /ad-publishing/linkedin/targeting/search

Requires scope: adPublishing.readonly.

Source

pub async fn create_lead_form( &self, account_id: &str, params: &CreateLeadFormParams, body: &LinkedInCreateLeadFormBodyDTO, ) -> Result<Value>

Create lead form

Create a new LinkedIn lead gen form for an ad account

POST /ad-publishing/linkedin/{accountId}/form

Requires scope: adPublishing.write.

Source

pub async fn get_lead_forms( &self, account_id: &str, params: &GetLeadFormsParams, ) -> Result<Value>

Get lead forms

Retrieve LinkedIn lead gen forms for an ad account

GET /ad-publishing/linkedin/{accountId}/forms

Requires scope: adPublishing.readonly.

Source

pub async fn update_ad_status( &self, ad_id: &str, params: &UpdateAdStatusParams, body: &LinkedInUpdateAdStatusBodyDTO, ) -> Result<Value>

Update ad status

Pause or resume a LinkedIn ad, campaign, or ad group

PATCH /ad-publishing/linkedin/{adId}/status

Requires scope: adPublishing.write.

Trait Implementations§

Source§

impl Clone for AdManagerService

Source§

fn clone(&self) -> AdManagerService

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AdManagerService

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more