class AdvertisersCampaigns extends Resource (View source)

The "campaigns" collection of methods.

Typical usage is:

 $displayvideoService = new Google\Service\DisplayVideo(...);
 $campaigns = $displayvideoService->advertisers_campaigns;

Methods

create(string $advertiserId, Campaign $postBody, array $optParams = [])

Creates a new campaign. Returns the newly created campaign if successful.

delete(string $advertiserId, string $campaignId, array $optParams = [])

Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to ENTITY_STATUS_ARCHIVED, to be able to delete it. This method regularly experiences high latency. We recommend increasing your default timeout to avoid errors.

get(string $advertiserId, string $campaignId, array $optParams = [])

Gets a campaign. (campaigns.get)

listAdvertisersCampaigns(string $advertiserId, array $optParams = [])

Lists campaigns in an advertiser. The order is defined by the order_by parameter. If a filter by entity_status is not specified, campaigns with ENTITY_STATUS_ARCHIVED will not be included in the results.

listAssignedTargetingOptions(string $advertiserId, string $campaignId, array $optParams = [])

Lists assigned targeting options of a campaign across targeting types.

patch(string $advertiserId, string $campaignId, Campaign $postBody, array $optParams = [])

Updates an existing campaign. Returns the updated campaign if successful.

Details

Campaign create(string $advertiserId, Campaign $postBody, array $optParams = [])

Creates a new campaign. Returns the newly created campaign if successful.

(campaigns.create)

Parameters

string $advertiserId

Output only. The unique ID of the advertiser the campaign belongs to.

Campaign $postBody
array $optParams

Optional parameters.

Return Value

Campaign

Exceptions

Exception

DisplayvideoEmpty delete(string $advertiserId, string $campaignId, array $optParams = [])

Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to ENTITY_STATUS_ARCHIVED, to be able to delete it. This method regularly experiences high latency. We recommend increasing your default timeout to avoid errors.

(campaigns.delete)

Parameters

string $advertiserId

The ID of the advertiser this campaign belongs to.

string $campaignId

The ID of the campaign we need to delete.

array $optParams

Optional parameters.

Return Value

DisplayvideoEmpty

Exceptions

Exception

Campaign get(string $advertiserId, string $campaignId, array $optParams = [])

Gets a campaign. (campaigns.get)

Parameters

string $advertiserId

Required. The ID of the advertiser this campaign belongs to.

string $campaignId

Required. The ID of the campaign to fetch.

array $optParams

Optional parameters.

Return Value

Campaign

Exceptions

Exception

ListCampaignsResponse listAdvertisersCampaigns(string $advertiserId, array $optParams = [])

Lists campaigns in an advertiser. The order is defined by the order_by parameter. If a filter by entity_status is not specified, campaigns with ENTITY_STATUS_ARCHIVED will not be included in the results.

(campaigns.listAdvertisersCampaigns)

Parameters

string $advertiserId

The ID of the advertiser to list campaigns for.

array $optParams

Optional parameters.

Return Value

ListCampaignsResponse

Exceptions

Exception

BulkListCampaignAssignedTargetingOptionsResponse listAssignedTargetingOptions(string $advertiserId, string $campaignId, array $optParams = [])

Lists assigned targeting options of a campaign across targeting types.

(campaigns.listAssignedTargetingOptions)

Parameters

string $advertiserId

Required. The ID of the advertiser the campaign belongs to.

string $campaignId

Required. The ID of the campaign to list assigned targeting options for.

array $optParams

Optional parameters.

Return Value

BulkListCampaignAssignedTargetingOptionsResponse

Exceptions

Exception

Campaign patch(string $advertiserId, string $campaignId, Campaign $postBody, array $optParams = [])

Updates an existing campaign. Returns the updated campaign if successful.

(campaigns.patch)

Parameters

string $advertiserId

Output only. The unique ID of the advertiser the campaign belongs to.

string $campaignId

Output only. The unique ID of the campaign. Assigned by the system.

Campaign $postBody
array $optParams

Optional parameters.

Return Value

Campaign

Exceptions

Exception