Skip to content

Commit 0f0fde3

Browse files
authored
Changes for release v17. (#866)
1 parent 437d614 commit 0f0fde3

File tree

1,549 files changed

+239299
-382
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,549 files changed

+239299
-382
lines changed

ChangeLog

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* 24.1.0
2+
- Google Ads API v17 release.
3+
- Remove page_size parameter from Search requests in all examples.
4+
15
* 24.0.0
26
- Google Ads API v16_1 release.
37
- Remove support for Google Ads API v14.

examples/account_management/create_customer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def main(client, manager_customer_id):
7373

7474
# GoogleAdsClient will read the google-ads.yaml configuration file in the
7575
# home directory if none is specified.
76-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
76+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
7777

7878
try:
7979
main(googleads_client, args.manager_customer_id)

examples/account_management/get_account_hierarchy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def print_account_hierarchy(
197197

198198
# GoogleAdsClient will read the google-ads.yaml configuration file in the
199199
# home directory if none is specified.
200-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
200+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
201201
try:
202202
main(googleads_client, args.login_customer_id)
203203
except GoogleAdsException as ex:

examples/account_management/get_change_details.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
from google.ads.googleads.util import get_nested_attr
3030

3131

32-
_DEFAULT_PAGE_SIZE = 1000
33-
34-
3532
# [START get_change_details]
3633
def main(client, customer_id):
3734
"""Gets specific details about the most recent changes in the given account.
@@ -72,7 +69,6 @@ def main(client, customer_id):
7269
search_request = client.get_type("SearchGoogleAdsRequest")
7370
search_request.customer_id = customer_id
7471
search_request.query = query
75-
search_request.page_size = _DEFAULT_PAGE_SIZE
7672

7773
results = googleads_service.search(request=search_request)
7874

@@ -200,7 +196,7 @@ def main(client, customer_id):
200196

201197
# GoogleAdsClient will read the google-ads.yaml configuration file in the
202198
# home directory if none is specified.
203-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
199+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
204200
try:
205201
main(googleads_client, args.customer_id)
206202
except GoogleAdsException as ex:

examples/account_management/get_change_summary.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
from google.ads.googleads.client import GoogleAdsClient
2525
from google.ads.googleads.errors import GoogleAdsException
2626

27-
_DEFAULT_PAGE_SIZE = 1000
28-
2927

3028
# [START get_change_summary]
3129
def main(client, customer_id):
@@ -52,7 +50,6 @@ def main(client, customer_id):
5250
search_request = client.get_type("SearchGoogleAdsRequest")
5351
search_request.customer_id = customer_id
5452
search_request.query = query
55-
search_request.page_size = _DEFAULT_PAGE_SIZE
5653

5754
response = ads_service.search(request=search_request)
5855

@@ -101,7 +98,7 @@ def main(client, customer_id):
10198

10299
# GoogleAdsClient will read the google-ads.yaml configuration file in the
103100
# home directory if none is specified.
104-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
101+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
105102

106103
try:
107104
main(googleads_client, args.customer_id)

examples/account_management/invite_user_with_access_role.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def main(client, customer_id, email_address, access_role):
9090

9191
# GoogleAdsClient will read the google-ads.yaml configuration file in the
9292
# home directory if none is specified.
93-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
93+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
9494

9595
try:
9696
main(

examples/account_management/link_manager_to_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def main(client, customer_id, manager_customer_id):
131131

132132
# GoogleAdsClient will read the google-ads.yaml configuration file in the
133133
# home directory if none is specified.
134-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
134+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
135135
try:
136136
main(googleads_client, args.customer_id, args.manager_customer_id)
137137
except GoogleAdsException as ex:

examples/account_management/list_accessible_customers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def main(client):
4444
if __name__ == "__main__":
4545
# GoogleAdsClient will read the google-ads.yaml configuration file in the
4646
# home directory if none is specified.
47-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
47+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
4848

4949
try:
5050
main(googleads_client)

examples/account_management/update_user_access.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def modify_user_access(client, customer_id, user_id, access_role):
167167

168168
# GoogleAdsClient will read the google-ads.yaml configuration file in the
169169
# home directory if none is specified.
170-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
170+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
171171
try:
172172
main(
173173
googleads_client,

examples/account_management/verify_advertiser_identity.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def start_identity_verification(client, customer_id):
144144

145145
# GoogleAdsClient will read the google-ads.yaml configuration file in the
146146
# home directory if none is specified.
147-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
147+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
148148

149149
try:
150150
main(googleads_client, args.customer_id)

examples/advanced_operations/add_ad_customizer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def create_ad_with_customizations(
287287

288288
# GoogleAdsClient will read the google-ads.yaml configuration file in the
289289
# home directory if none is specified.
290-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
290+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
291291

292292
try:
293293
main(googleads_client, args.customer_id, args.ad_group_id)

examples/advanced_operations/add_ad_group_bid_modifier.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def main(client, customer_id, ad_group_id, bid_modifier_value):
9292

9393
# GoogleAdsClient will read the google-ads.yaml configuration file in the
9494
# home directory if none is specified.
95-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
95+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
9696

9797
try:
9898
main(

examples/advanced_operations/add_app_campaign.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def create_ad_text_asset(client, text):
310310

311311
# GoogleAdsClient will read the google-ads.yaml configuration file in the
312312
# home directory if none is specified.
313-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
313+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
314314

315315
try:
316316
main(googleads_client, args.customer_id)

examples/advanced_operations/add_bidding_data_exclusion.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def main(client, customer_id, start_date_time, end_date_time):
111111

112112
# GoogleAdsClient will read the google-ads.yaml configuration file in the
113113
# home directory if none is specified.
114-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
114+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
115115

116116
try:
117117
main(

examples/advanced_operations/add_bidding_seasonality_adjustment.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def main(
133133

134134
# GoogleAdsClient will read the google-ads.yaml configuration file in the
135135
# home directory if none is specified.
136-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
136+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
137137

138138
try:
139139
main(

examples/advanced_operations/add_call_ad.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def main(
146146

147147
# GoogleAdsClient will read the google-ads.yaml configuration file in the
148148
# home directory if none is specified.
149-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
149+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
150150

151151
try:
152152
main(

examples/advanced_operations/add_display_upload_ad.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def create_display_upload_ad_group_ad(
170170

171171
# GoogleAdsClient will read the google-ads.yaml configuration file in the
172172
# home directory if none is specified.
173-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
173+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
174174

175175
try:
176176
main(googleads_client, args.customer_id, args.ad_group_id)

examples/advanced_operations/add_dynamic_page_feed_asset.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def add_dsa_target(client, customer_id, ad_group_id, dsa_page_url_label):
288288

289289
# GoogleAdsClient will read the google-ads.yaml configuration file in the
290290
# home directory if none is specified.
291-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
291+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
292292

293293
try:
294294
main(

examples/advanced_operations/add_dynamic_search_ads.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def add_webpage_criterion(client, customer_id, ad_group_resource_name):
275275

276276
# GoogleAdsClient will read the google-ads.yaml configuration file in the
277277
# home directory if none is specified.
278-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
278+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
279279

280280
try:
281281
main(googleads_client, args.customer_id)

examples/advanced_operations/add_performance_max_campaign.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ def create_asset_group_signal_operation(client, customer_id, audience_id):
690690

691691
# GoogleAdsClient will read the google-ads.yaml configuration file in the
692692
# home directory if none is specified.
693-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
693+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
694694

695695
try:
696696
main(googleads_client, args.customer_id, args.audience_id)

examples/advanced_operations/add_responsive_search_ad_full.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ def add_geo_targeting(client, customer_id, campaign_resource_name):
588588

589589
# GoogleAdsClient will read the google-ads.yaml configuration file in the
590590
# home directory if none is specified.
591-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
591+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
592592

593593
try:
594594
main(

examples/advanced_operations/add_smart_campaign.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ def print_response_details(response):
872872

873873
# GoogleAdsClient will read the google-ads.yaml configuration file in the
874874
# home directory if none is specified.
875-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
875+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
876876

877877
try:
878878
main(

examples/advanced_operations/create_and_attach_shared_keyword_set.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,6 @@ def handle_googleads_exception(exception):
130130

131131
# GoogleAdsClient will read the google-ads.yaml configuration file in the
132132
# home directory if none is specified.
133-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
133+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
134134

135135
main(googleads_client, args.customer_id, args.campaign_id)

examples/advanced_operations/find_and_remove_criteria_from_shared_set.py

+3-10
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@
2222
from google.ads.googleads.errors import GoogleAdsException
2323

2424

25-
_DEFAULT_PAGE_SIZE = 10000
26-
27-
28-
def main(client, customer_id, page_size, campaign_id):
25+
def main(client, customer_id, campaign_id):
2926
ga_service = client.get_service("GoogleAdsService")
3027
shared_criterion_service = client.get_service("SharedCriterionService")
3128

@@ -41,7 +38,6 @@ def main(client, customer_id, page_size, campaign_id):
4138
shared_set_search_request = client.get_type("SearchGoogleAdsRequest")
4239
shared_set_search_request.customer_id = customer_id
4340
shared_set_search_request.query = shared_sets_query
44-
shared_set_search_request.page_size = _DEFAULT_PAGE_SIZE
4541

4642
shared_set_response = ga_service.search(
4743
request=shared_set_search_request
@@ -75,7 +71,6 @@ def main(client, customer_id, page_size, campaign_id):
7571
)
7672
shared_criteria_search_request.customer_id = customer_id
7773
shared_criteria_search_request.query = shared_criteria_query
78-
shared_criteria_search_request.page_size = _DEFAULT_PAGE_SIZE
7974

8075
shared_criteria_response = ga_service.search(
8176
request=shared_criteria_search_request
@@ -154,8 +149,6 @@ def handle_googleads_exception(exception):
154149

155150
# GoogleAdsClient will read the google-ads.yaml configuration file in the
156151
# home directory if none is specified.
157-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
152+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
158153

159-
main(
160-
googleads_client, args.customer_id, _DEFAULT_PAGE_SIZE, args.campaign_id
161-
)
154+
main(googleads_client, args.customer_id, args.campaign_id)

examples/advanced_operations/get_ad_group_bid_modifiers.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@
2020
from google.ads.googleads.client import GoogleAdsClient
2121
from google.ads.googleads.errors import GoogleAdsException
2222

23-
_DEFAULT_PAGE_SIZE = 1000
2423

25-
26-
def main(client, customer_id, page_size, ad_group_id=None):
24+
def main(client, customer_id, ad_group_id=None):
2725
ga_service = client.get_service("GoogleAdsService")
2826

2927
query = """
@@ -52,7 +50,6 @@ def main(client, customer_id, page_size, ad_group_id=None):
5250
search_request = client.get_type("SearchGoogleAdsRequest")
5351
search_request.customer_id = customer_id
5452
search_request.query = query
55-
search_request.page_size = _DEFAULT_PAGE_SIZE
5653

5754
results = ga_service.search(request=search_request)
5855

@@ -119,13 +116,12 @@ def main(client, customer_id, page_size, ad_group_id=None):
119116

120117
# GoogleAdsClient will read the google-ads.yaml configuration file in the
121118
# home directory if none is specified.
122-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
119+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
123120

124121
try:
125122
main(
126123
googleads_client,
127124
args.customer_id,
128-
_DEFAULT_PAGE_SIZE,
129125
ad_group_id=args.ad_group_id,
130126
)
131127
except GoogleAdsException as ex:

examples/advanced_operations/use_cross_account_bidding_strategy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def attach_cross_account_bidding_strategy_to_campaign(
245245

246246
# GoogleAdsClient will read the google-ads.yaml configuration file in the
247247
# home directory if none is specified.
248-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
248+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
249249

250250
try:
251251
main(

examples/advanced_operations/use_portfolio_bidding_strategy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,6 @@ def handle_googleads_exception(exception):
138138

139139
# GoogleAdsClient will read the google-ads.yaml configuration file in the
140140
# home directory if none is specified.
141-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
141+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
142142

143143
main(googleads_client, args.customer_id)

examples/assets/add_call.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def link_asset_to_account(client, customer_id, asset_resource_name):
161161

162162
# GoogleAdsClient will read the google-ads.yaml configuration file in the
163163
# home directory if none is specified.
164-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
164+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
165165

166166
try:
167167
main(

examples/assets/add_hotel_callout.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def link_asset_to_account(client, customer_id, resource_names):
137137

138138
# GoogleAdsClient will read the google-ads.yaml configuration file in the
139139
# home directory if none is specified.
140-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
140+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
141141

142142
try:
143143
main(googleads_client, args.customer_id, args.language_code)

examples/assets/add_lead_form_asset.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def create_lead_form_campaign_asset(
195195

196196
# GoogleAdsClient will read the google-ads.yaml configuration file in the
197197
# home directory if none is specified.
198-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
198+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
199199

200200
try:
201201
main(googleads_client, args.customer_id, args.campaign_id)

examples/assets/add_prices.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def add_asset_to_account(client, customer_id, price_asset_resource_name):
197197

198198
# GoogleAdsClient will read the google-ads.yaml configuration file in the
199199
# home directory if none is specified.
200-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
200+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
201201

202202
try:
203203
main(googleads_client, args.customer_id)

examples/assets/add_sitelinks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def link_sitelinks_to_campaign(
155155

156156
# GoogleAdsClient will read the google-ads.yaml configuration file in the
157157
# home directory if none is specified.
158-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
158+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
159159

160160
try:
161161
main(googleads_client, args.customer_id, args.campaign_id)

examples/basic_operations/add_ad_groups.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def main(client, customer_id, campaign_id):
6565

6666
# GoogleAdsClient will read the google-ads.yaml configuration file in the
6767
# home directory if none is specified.
68-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
68+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
6969

7070
try:
7171
main(googleads_client, args.customer_id, args.campaign_id)

examples/basic_operations/add_campaigns.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,6 @@ def handle_googleads_exception(exception):
129129

130130
# GoogleAdsClient will read the google-ads.yaml configuration file in the
131131
# home directory if none is specified.
132-
googleads_client = GoogleAdsClient.load_from_storage(version="v16")
132+
googleads_client = GoogleAdsClient.load_from_storage(version="v17")
133133

134134
main(googleads_client, args.customer_id)

0 commit comments

Comments
 (0)