Skip to main content

GoogleProvider

Struct GoogleProvider 

Source
pub struct GoogleProvider { /* private fields */ }
Expand description

Google Ads marketing provider.

Wraps a GoogleClient and implements MarketingProvider using the Google Ads REST API: GAQL for reads, :mutate endpoints for writes.

Implementations§

Source§

impl GoogleProvider

Source

pub const fn new(client: GoogleClient) -> Self

Create a new Google Ads provider.

Trait Implementations§

Source§

impl Debug for GoogleProvider

Source§

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

Formats the value using the given formatter. Read more
Source§

impl MarketingProvider for GoogleProvider

Source§

fn name(&self) -> &'static str

Short lowercase name used in CLI commands: "meta", "google", "tiktok".
Source§

fn display_name(&self) -> &'static str

Human-readable display name: "Meta (Facebook/Instagram)".
Source§

fn capabilities(&self) -> ProviderCapabilities

What this provider can do.
Source§

fn list_campaigns( &self, filters: &CampaignFilters, ) -> impl Future<Output = Result<Paginated<Campaign>>> + Send

List campaigns matching the given filters.
Source§

fn get_campaign( &self, id: &CampaignId, ) -> impl Future<Output = Result<Campaign>> + Send

Get a single campaign by ID.
Source§

fn create_campaign( &self, input: &CreateCampaignInput, ) -> impl Future<Output = Result<Campaign>> + Send

Create a new campaign.
Source§

fn update_campaign( &self, id: &CampaignId, input: &UpdateCampaignInput, ) -> impl Future<Output = Result<Campaign>> + Send

Update an existing campaign.
Source§

fn delete_campaign( &self, id: &CampaignId, ) -> impl Future<Output = Result<()>> + Send

Delete a campaign by ID.
Source§

fn get_insights( &self, query: &InsightsQuery, ) -> impl Future<Output = Result<InsightsReport>> + Send

Query analytics / insights.
Source§

async fn health_check(&self) -> Result<ProviderHealth>

Verify that credentials are valid and the API is reachable.
Source§

fn list_adsets( &self, _campaign_id: &CampaignId, ) -> impl Future<Output = Result<Paginated<AdSet>, MktError>> + Send

List ad sets for a campaign.
Source§

fn create_adset( &self, _input: &CreateAdSetInput, ) -> impl Future<Output = Result<AdSet, MktError>> + Send

Create a new ad set.
Source§

fn create_creative( &self, _input: &CreateCreativeInput, ) -> impl Future<Output = Result<Creative, MktError>> + Send

Create an ad creative.
Source§

fn create_dark_post( &self, _input: &CreateDarkPostInput, ) -> impl Future<Output = Result<Creative, MktError>> + Send

Create an unpublished (dark) post for use in ads.
Source§

fn list_audiences( &self, ) -> impl Future<Output = Result<Vec<Audience>, MktError>> + Send

List all audiences.
Source§

fn create_audience( &self, _input: &CreateAudienceInput, ) -> impl Future<Output = Result<Audience, MktError>> + Send

Create a new audience.
Source§

fn add_users_to_audience( &self, _id: &AudienceId, _users: &[AudienceUser], ) -> impl Future<Output = Result<AudienceUpdateResult, MktError>> + Send

Add users to an existing audience.
Source§

fn publish_post( &self, _input: &PublishPostInput, ) -> impl Future<Output = Result<Post, MktError>> + Send

Publish an organic post (Facebook Page, Instagram, etc.).
Source§

fn promote_post( &self, _post_id: &PostId, _input: &PromotePostInput, ) -> impl Future<Output = Result<Ad, MktError>> + Send

Promote an existing organic post as an ad.
Source§

fn upload_image( &self, _input: &UploadImageInput, ) -> impl Future<Output = Result<MediaAsset, MktError>> + Send

Upload an image asset.
Source§

fn upload_video( &self, _input: &UploadVideoInput, ) -> impl Future<Output = Result<MediaAsset, MktError>> + Send

Upload a video asset.
Source§

fn raw_request( &self, _method: HttpMethod, _path: &str, _params: &Value, ) -> impl Future<Output = Result<Value, MktError>> + Send

Execute a raw API call, bypassing model mapping.

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<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> Same for T

Source§

type Output = T

Should always be Self
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<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