Skip to content

Commit

Permalink
Changes for API version 18_0. (#891)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobhancockg authored Oct 17, 2024
1 parent ef62b42 commit 6c205c4
Show file tree
Hide file tree
Showing 1,578 changed files with 233,625 additions and 112 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
* 25.1.0
- Google Ads API v18 release.

* 25.0.0
- Google Ads API v17_1 release.
- Remove support for Google Ads API v15.
Expand Down
2 changes: 1 addition & 1 deletion examples/account_management/create_customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def main(client, manager_customer_id):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.manager_customer_id)
Expand Down
2 changes: 1 addition & 1 deletion examples/account_management/get_account_hierarchy.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def print_account_hierarchy(

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")
try:
main(googleads_client, args.login_customer_id)
except GoogleAdsException as ex:
Expand Down
2 changes: 1 addition & 1 deletion examples/account_management/get_change_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def main(client, customer_id):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")
try:
main(googleads_client, args.customer_id)
except GoogleAdsException as ex:
Expand Down
2 changes: 1 addition & 1 deletion examples/account_management/get_change_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def main(client, customer_id):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.customer_id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def main(client, customer_id, email_address, access_role):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(
Expand Down
2 changes: 1 addition & 1 deletion examples/account_management/link_manager_to_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def main(client, customer_id, manager_customer_id):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")
try:
main(googleads_client, args.customer_id, args.manager_customer_id)
except GoogleAdsException as ex:
Expand Down
2 changes: 1 addition & 1 deletion examples/account_management/list_accessible_customers.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def main(client):
if __name__ == "__main__":
# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client)
Expand Down
2 changes: 1 addition & 1 deletion examples/account_management/update_user_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def modify_user_access(client, customer_id, user_id, access_role):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")
try:
main(
googleads_client,
Expand Down
2 changes: 1 addition & 1 deletion examples/account_management/verify_advertiser_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def start_identity_verification(client, customer_id):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.customer_id)
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced_operations/add_ad_customizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def create_ad_with_customizations(

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.customer_id, args.ad_group_id)
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced_operations/add_ad_group_bid_modifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def main(client, customer_id, ad_group_id, bid_modifier_value):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced_operations/add_app_campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def create_ad_text_asset(client, text):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.customer_id)
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced_operations/add_bidding_data_exclusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def main(client, customer_id, start_date_time, end_date_time):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def main(

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced_operations/add_call_ad.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def main(

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced_operations/add_display_upload_ad.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def create_display_upload_ad_group_ad(

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.customer_id, args.ad_group_id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def add_dsa_target(client, customer_id, ad_group_id, dsa_page_url_label):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced_operations/add_dynamic_search_ads.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def add_webpage_criterion(client, customer_id, ad_group_resource_name):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.customer_id)
Expand Down
6 changes: 2 additions & 4 deletions examples/advanced_operations/add_performance_max_campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,6 @@ def print_response_details(response):
)



def create_asset_group_signal_operations(client, customer_id, audience_id):
"""Creates a list of MutateOperations that may create asset group signals.
Expand Down Expand Up @@ -668,12 +667,11 @@ def create_asset_group_signal_operations(client, customer_id, audience_id):
mutate_operation = client.get_type("MutateOperation")
operation = mutate_operation.asset_group_signal_operation.create
operation.asset_group = asset_group_resource_name
operation.search_theme.text = "travel"
operation.search_theme.text = "travel"
operations.append(mutate_operation)
# [END add_performance_max_campaign_10]

return operations



# [END add_performance_max_campaign]
Expand Down Expand Up @@ -701,7 +699,7 @@ def create_asset_group_signal_operations(client, customer_id, audience_id):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.customer_id, args.audience_id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ def add_geo_targeting(client, customer_id, campaign_resource_name):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced_operations/add_smart_campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ def print_response_details(response):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,6 @@ def handle_googleads_exception(exception):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

main(googleads_client, args.customer_id, args.campaign_id)
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,6 @@ def handle_googleads_exception(exception):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

main(googleads_client, args.customer_id, args.campaign_id)
2 changes: 1 addition & 1 deletion examples/advanced_operations/get_ad_group_bid_modifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def main(client, customer_id, ad_group_id=None):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def attach_cross_account_bidding_strategy_to_campaign(

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,6 @@ def handle_googleads_exception(exception):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

main(googleads_client, args.customer_id)
2 changes: 1 addition & 1 deletion examples/assets/add_call.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def link_asset_to_account(client, customer_id, asset_resource_name):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(
Expand Down
2 changes: 1 addition & 1 deletion examples/assets/add_hotel_callout.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def link_asset_to_account(client, customer_id, resource_names):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.customer_id, args.language_code)
Expand Down
2 changes: 1 addition & 1 deletion examples/assets/add_lead_form_asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def create_lead_form_campaign_asset(

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.customer_id, args.campaign_id)
Expand Down
2 changes: 1 addition & 1 deletion examples/assets/add_prices.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def add_asset_to_account(client, customer_id, price_asset_resource_name):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.customer_id)
Expand Down
2 changes: 1 addition & 1 deletion examples/assets/add_sitelinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def link_sitelinks_to_campaign(

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.customer_id, args.campaign_id)
Expand Down
2 changes: 1 addition & 1 deletion examples/basic_operations/add_ad_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def main(client, customer_id, campaign_id):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.customer_id, args.campaign_id)
Expand Down
2 changes: 1 addition & 1 deletion examples/basic_operations/add_campaigns.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,6 @@ def handle_googleads_exception(exception):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

main(googleads_client, args.customer_id)
2 changes: 1 addition & 1 deletion examples/basic_operations/get_campaigns.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def main(client, customer_id):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.customer_id)
Expand Down
2 changes: 1 addition & 1 deletion examples/basic_operations/get_responsive_search_ads.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def ad_text_assets_to_strs(assets):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(
Expand Down
2 changes: 1 addition & 1 deletion examples/basic_operations/pause_ad.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def main(client, customer_id, ad_group_id, ad_id):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.customer_id, args.ad_group_id, args.ad_id)
Expand Down
2 changes: 1 addition & 1 deletion examples/basic_operations/remove_campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def main(client, customer_id, campaign_id):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.customer_id, args.campaign_id)
Expand Down
2 changes: 1 addition & 1 deletion examples/basic_operations/search_for_google_ads_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def main(client, name_prefix):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.name_prefix)
Expand Down
2 changes: 1 addition & 1 deletion examples/basic_operations/update_ad_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def main(client, customer_id, ad_group_id, cpc_bid_micro_amount):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(
Expand Down
2 changes: 1 addition & 1 deletion examples/basic_operations/update_campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def main(client, customer_id, campaign_id):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.customer_id, args.campaign_id)
Expand Down
2 changes: 1 addition & 1 deletion examples/basic_operations/update_responsive_search_ad.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def main(client, customer_id, ad_id):

# GoogleAdsClient will read the google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
googleads_client = GoogleAdsClient.load_from_storage(version="v18")

try:
main(googleads_client, args.customer_id, args.ad_id)
Expand Down
Loading

0 comments on commit 6c205c4

Please sign in to comment.