"""This example adds a campaign group and sets a performance target for it.
The integer ID of the created campaign group.
"""Adds multiple campaigns to a campaign group.
campaign_group_id: an integer ID for the campaign group.
campaign_ids: a list of integer IDs for campaigns.
"""Creates a performance target for the campaign group.
"""This example adds a label to multiple campaigns.
"""This uses the BatchJobService to create a complete Campaign.
# Retrieve the URL used to upload the BatchJob operations.
# Generate operations to upload.
# Download and display results.
"""Add a new BatchJob to upload operations to.
client: an instantiated AdWordsClient used to retrieve the BatchJob.
The new BatchJob created by the request.
"""Builds the operations adding an ExpandedTextAd to each AdGroup.
adgroup_operations: a list containing the operations that will add AdGroups.
each of the provided AdGroups.
# because a given service only handles one type of operation.
"""Builds the operations adding a Keyword Criterion to each AdGroup.
number_of_keywords: an int defining the number of Keywords to be created.
associated with each provided AdGroup.
"""Builds the operations adding desired number of AdGroups to given Campaigns.
AdGroups to each of the provided Campaigns.
"""Builds the operations needed to create a new Budget.
a list containing the operation that will create a new Budget.
# A list of operations creating a Budget.
# Budget for operations that require a budgetId.
"""Builds the operations needed to create Negative Campaign Criterion.
Criterion associated with each provided Campaign.
"""Builds the operations needed to create a new Campaign.
a list containing the operations to create the desired number of Campaigns.
# Grab the temporary budgetId to associate with the new Campaigns.
# you've added targeting and the ads are ready to serve.
# the Campaigns for operations that require a campaignId.
"""Retrieves the BatchJob with the given id.
batch_job_id: a long identifying the BatchJob to be retrieved.
The BatchJob associated with the given id.
"""Retrieves the downloadUrl when the BatchJob is complete.
client: an instantiated AdWordsClient used to poll the BatchJob.
batch_job_id: a long identifying the BatchJob to be polled.
checked to determine whether it has completed.
A str containing the downloadUrl of the completed BatchJob.
response_xml: a string containing a response from the BatchJobService.
"""Creates a draft and accesses its associated draft campaign.
# include additional ads. Adding a criteria is shown here.
"""This example illustrates how to incrementally upload keywords.
Uses the BatchJobService and BatchJobHelper to incrementally upload operations.
# Generate and upload first set of operations.
# Generate and upload second set of operations.
# Generate and upload third and final set of operations.
client: an instantiated AdWordsClient used to cancel the BatchJob.
batch_job: a BatchJob to be canceled.
checked to determine whether it has been canceled.
# Verify that the Batch Job cancels.
"""Creates a trial and waits for it to complete.
"""This example gets all disapproved ads for a given campaign.
To add an ad, run add_ads.py.
# Display the policy topic entries related to the ad disapproval.
"""This example gets all disapproved ads for a given campaign with AWQL.
# Construct query and get all ads for a given campaign.
"""This example gets all campaigns with a specific label.
To add a label to campaigns, run add_campaign_labels.py.
# none of the label IDs.
"""Illustrates how to graduate a trial.
# campaign created by graduation.
# add_trial.py to wait for the asynchronous operation to finish.
"""This example adds a text ad with ad parameters.
To get ad groups, run get_ad_groups.py. To get keywords, run add_keywords.py.
# Construct operations for adding text ad object and add to an ad group.
# Construct operations for setting ad parameters.
"""This example sets a bid modifier for the mobile platform on given campaign.
# Create mobile platform.The ID can be found in the documentation.
"""This example shows how to use validateOnly SOAP header.
No objects will be created, but exceptions will still be returned.
# Initialize appropriate service with validate only flag enabled.
# Construct operations to add an expanded text ad.
# No error means the request is valid.
# Now let's check an invalid ad using a very long line to trigger an error.