Skip to content

Commit

Permalink
Changes for release v13. (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenRKarl committed Feb 17, 2023
1 parent 9f52ec2 commit 15d3efa
Show file tree
Hide file tree
Showing 2,127 changed files with 184,264 additions and 183,208 deletions.
11 changes: 10 additions & 1 deletion ChangeLog
@@ -1,4 +1,13 @@
* 18.2.0
* 20.0.0
- Remove support for Google Ads API v10.
- Google Ads API v13 release.
- Extend version range for proto-plus and google-api-core
- Update add_customer_match_user_list example with more complex user identifiers
- Remove add_expression_rule_user_list example
- Update remarketing examples to use flexible rule user lists
- Update get_ad_group_bid_modifiers example to remove preferred content criteria

* 19.0.0
- Google Ads API v12 release.
- Bump proto-plus to 1.22.1.
- Remove example for Add Dynamic Page Feed.
Expand Down
Expand Up @@ -125,7 +125,7 @@ def update_merchant_center_link_status(
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description=("Approves a Merchant Center link request.")
Expand Down
2 changes: 1 addition & 1 deletion examples/account_management/create_customer.py
Expand Up @@ -58,7 +58,7 @@ def main(client, manager_customer_id):
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description=("Creates a new client under the given manager.")
Expand Down
2 changes: 1 addition & 1 deletion examples/account_management/get_account_hierarchy.py
Expand Up @@ -179,7 +179,7 @@ def print_account_hierarchy(
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description="This example gets the account hierarchy of the specified "
Expand Down
2 changes: 1 addition & 1 deletion examples/account_management/get_account_information.py
Expand Up @@ -55,7 +55,7 @@ def main(client, customer_id):
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description=(
Expand Down
2 changes: 1 addition & 1 deletion examples/account_management/get_change_details.py
Expand Up @@ -186,7 +186,7 @@ def main(client, customer_id):
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description="This example gets specific details about the most recent "
Expand Down
2 changes: 1 addition & 1 deletion examples/account_management/get_change_summary.py
Expand Up @@ -85,7 +85,7 @@ def main(client, customer_id):
if __name__ == "__main__":
# GoogleAdsClient will read a google-ads.yaml configuration file in the
# home directory if none is specified.
googleads_client = GoogleAdsClient.load_from_storage(version="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description=(
Expand Down
2 changes: 1 addition & 1 deletion examples/account_management/get_pending_invitations.py
Expand Up @@ -65,7 +65,7 @@ def main(client, customer_id):
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description=("Retrieves pending invitations for a customer account.")
Expand Down
Expand Up @@ -59,7 +59,7 @@ def main(client, customer_id, email_address, access_role):
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description=(
Expand Down
10 changes: 3 additions & 7 deletions examples/account_management/link_manager_to_client.py
Expand Up @@ -85,12 +85,8 @@ def main(client, customer_id, manager_customer_id):
)
manager_link_operation = client.get_type("CustomerManagerLinkOperation")
manager_link = manager_link_operation.update
manager_link.resource_name = (
customer_manager_link_service.customer_manager_link_path(
customer_id,
manager_customer_id,
manager_link_id,
)
manager_link.resource_name = customer_manager_link_service.customer_manager_link_path(
customer_id, manager_customer_id, manager_link_id,
)

manager_link.status = client.enums.ManagerLinkStatusEnum.ACTIVE
Expand All @@ -112,7 +108,7 @@ def main(client, customer_id, manager_customer_id):
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description=(
Expand Down
2 changes: 1 addition & 1 deletion examples/account_management/list_accessible_customers.py
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

try:
main(googleads_client)
Expand Down
8 changes: 3 additions & 5 deletions examples/account_management/reject_merchant_center_link.py
Expand Up @@ -45,10 +45,8 @@ def main(client, customer_id, merchant_center_account_id):
"MerchantCenterLinkService"
)
# Get the extant customer account to Merchant Center account links.
list_merchant_center_links_response = (
merchant_center_link_service.list_merchant_center_links(
customer_id=customer_id
)
list_merchant_center_links_response = merchant_center_link_service.list_merchant_center_links(
customer_id=customer_id
)

number_of_links = len(
Expand Down Expand Up @@ -131,7 +129,7 @@ def remove_merchant_center_link(
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description=(
Expand Down
8 changes: 3 additions & 5 deletions examples/account_management/update_user_access.py
Expand Up @@ -113,10 +113,8 @@ def modify_user_access(client, customer_id, user_id, access_role):
customer_user_access_op = client.get_type("CustomerUserAccessOperation")
access_role_enum = client.enums.AccessRoleEnum
customer_user_access = customer_user_access_op.update
customer_user_access.resource_name = (
customer_user_access_service.customer_user_access_path(
customer_id, user_id
)
customer_user_access.resource_name = customer_user_access_service.customer_user_access_path(
customer_id, user_id
)
customer_user_access.access_role = getattr(access_role_enum, access_role)
client.copy_from(
Expand All @@ -137,7 +135,7 @@ def modify_user_access(client, customer_id, user_id, access_role):
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description="This code example updates the access role of a user, "
Expand Down
8 changes: 2 additions & 6 deletions examples/advanced_operations/add_ad_customizer.py
Expand Up @@ -263,7 +263,7 @@ def create_ad_with_customizations(
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description=(
Expand All @@ -281,11 +281,7 @@ def create_ad_with_customizations(
help="The Google Ads customer ID.",
)
parser.add_argument(
"-a",
"--ad_group_id",
type=str,
required=True,
help="An ad group ID.",
"-a", "--ad_group_id", type=str, required=True, help="An ad group ID.",
)
args = parser.parse_args()

Expand Down
5 changes: 2 additions & 3 deletions examples/advanced_operations/add_ad_group_bid_modifier.py
Expand Up @@ -51,8 +51,7 @@ def main(client, customer_id, ad_group_id, bid_modifier_value):

# Add the ad group bid modifier.
ad_group_bm_response = ad_group_bm_service.mutate_ad_group_bid_modifiers(
customer_id=customer_id,
operations=[ad_group_bid_modifier_operation],
customer_id=customer_id, operations=[ad_group_bid_modifier_operation],
)
# [END add_ad_group_bid_modifier]

Expand All @@ -65,7 +64,7 @@ def main(client, customer_id, ad_group_id, bid_modifier_value):
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description=(
Expand Down
10 changes: 5 additions & 5 deletions examples/advanced_operations/add_app_campaign.py
Expand Up @@ -183,8 +183,8 @@ def set_campaign_targeting_criteria(
)
campaign_criterion = campaign_criterion_operation.create
campaign_criterion.campaign = campaign_resource_name
campaign_criterion.location.geo_target_constant = (
geo_target_constant_service.geo_target_constant_path(location_id)
campaign_criterion.location.geo_target_constant = geo_target_constant_service.geo_target_constant_path(
location_id
)
campaign_criterion_operations.append(campaign_criterion_operation)

Expand All @@ -195,8 +195,8 @@ def set_campaign_targeting_criteria(
)
campaign_criterion = campaign_criterion_operation.create
campaign_criterion.campaign = campaign_resource_name
campaign_criterion.language.language_constant = (
googleads_service.language_constant_path(language_id)
campaign_criterion.language.language_constant = googleads_service.language_constant_path(
language_id
)
campaign_criterion_operations.append(campaign_criterion_operation)

Expand Down Expand Up @@ -295,7 +295,7 @@ def create_ad_text_asset(client, text):
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description=(
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced_operations/add_bidding_data_exclusion.py
Expand Up @@ -80,7 +80,7 @@ def main(client, customer_id, start_date_time, end_date_time):
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description="Adds a data exclusion for conversions in Smart Bidding "
Expand Down
Expand Up @@ -94,7 +94,7 @@ def main(
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description="Adds a seasonality adjustment for conversions in Smart "
Expand Down
8 changes: 2 additions & 6 deletions examples/advanced_operations/add_call_ad.py
Expand Up @@ -101,7 +101,7 @@ def main(
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description=("Adds a call extension to a specific account.")
Expand All @@ -115,11 +115,7 @@ def main(
help="The Google Ads customer ID.",
)
parser.add_argument(
"-a",
"--ad_group_id",
type=str,
required=True,
help="An ad group ID.",
"-a", "--ad_group_id", type=str, required=True, help="An ad group ID.",
)
parser.add_argument(
"-n",
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced_operations/add_display_upload_ad.py
Expand Up @@ -150,7 +150,7 @@ def create_display_upload_ad_group_ad(
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description="Adds a display upload ad to a given ad group."
Expand Down
2 changes: 1 addition & 1 deletion examples/advanced_operations/add_dynamic_search_ads.py
Expand Up @@ -260,7 +260,7 @@ def add_webpage_criterion(client, customer_id, ad_group_resource_name):
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="v12")
googleads_client = GoogleAdsClient.load_from_storage(version="v13")

parser = argparse.ArgumentParser(
description=(
Expand Down

0 comments on commit 15d3efa

Please sign in to comment.