Skip to content

Commit 9541a75

Browse files
Changes for release 11_0. (#652)
Co-authored-by: Bob Hancock <[email protected]>
1 parent fd6b65e commit 9541a75

File tree

2,333 files changed

+216695
-7975
lines changed

Some content is hidden

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

2,333 files changed

+216695
-7975
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
* 17.0.0
2+
- Google Ads API v11_0 release.
3+
- Added example create_experiment.
4+
- Added example detect_and_apply_recommendations
5+
- Updated example add_smart_campaign
6+
17
* 16.0.0
28
- Add support for fog Google Ads API v10_1.
39
- Remove support for Google Ads API v8.

README.rst

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,6 @@ Documentation
2828
Please refer to our `Developer Site`_ for documentation on how to install,
2929
configure, and use this client library.
3030

31-
For Python 3.6 Users
32-
--------------------
33-
Version `12.0.0`_ of this library is the last version that is compatible with
34-
Python 3.6. It contains support for `v6`_, `v7`_, and `v8`_ of the Google Ads
35-
API. The latest API version supported by version `12.0.0`_, `v8`_, will be
36-
supported until the Spring of 2022, so Python 3.6 users can access the Google
37-
Ads API until then. Given that the `EOL`_ for Python 3.6 is December 23, 2021,
38-
we encourage our users to upgrade to Python 3.7 or above as soon as possible to
39-
avoid issues. Please follow the `Google Ads Developer Blog`_ for announcements
40-
of the specific deprecation dates for the above API versions.
41-
4231
Protobuf Messages
4332
-----------------
4433
Version `14.0.0`_ of this library introduced the **required** `use_proto_plus`
@@ -61,6 +50,7 @@ Authors
6150
* `Ben Karl`_
6251
* `Andrew Burke`_
6352
* `Laura Chevalier`_
53+
* `Bob Hancock`_
6454

6555
.. |build-status| image:: https://storage.googleapis.com/gaa-clientlibs/badges/google-ads-python/buildstatus_ubuntu.svg
6656
.. _Developer Site: https://developers.google.com/google-ads/api/docs/client-libs/python/
@@ -72,11 +62,12 @@ Authors
7262
.. _Ben Karl: https://github.com/BenRKarl
7363
.. _Andrew Burke: https://github.com/AndrewMBurke
7464
.. _Laura Chevalier: https://github.com/laurachevalier4
65+
.. _Bob Hancock: https://github.com/bobhancock
7566
.. _12.0.0: https://pypi.org/project/google-ads/12.0.0/
7667
.. _14.0.0: https://pypi.org/project/google-ads/14.0.0/
77-
.. _v6: https://developers.google.com/google-ads/api/reference/rpc/v6/overview
78-
.. _v7: https://developers.google.com/google-ads/api/reference/rpc/v7/overview
79-
.. _v8: https://developers.google.com/google-ads/api/reference/rpc/v8/overview
68+
.. _15.0.0: https://pypi.org/project/google-ads/15.0.0/
69+
.. _v9: https://developers.google.com/google-ads/api/reference/rpc/v9/overview
70+
.. _v10: https://developers.google.com/google-ads/api/reference/rpc/v10/overview
8071
.. _EOL: https://endoflife.date/python
8172
.. _Google Ads Developer Blog: https://ads-developers.googleblog.com/
8273
.. _Protobuf Messages: https://developers.google.com/google-ads/api/docs/client-libs/python/protobuf-messages

examples/advanced_operations/add_call_ad.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ def main(
115115
help="The Google Ads customer ID.",
116116
)
117117
parser.add_argument(
118-
"-a", "--ad_group_id", type=str, required=True, help="An ad group ID.",
118+
"-a",
119+
"--ad_group_id",
120+
type=str,
121+
required=True,
122+
help="An ad group ID.",
119123
)
120124
parser.add_argument(
121125
"-n",

examples/advanced_operations/add_performance_max_campaign.py

Lines changed: 50 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,22 @@ def main(client, customer_id, audience_id):
7575
#
7676
# Create the headlines.
7777
headline_asset_resource_names = _create_multiple_text_assets(
78-
client, customer_id, ["Travel", "Travel Reviews", "Book travel",],
78+
client,
79+
customer_id,
80+
[
81+
"Travel",
82+
"Travel Reviews",
83+
"Book travel",
84+
],
7985
)
8086
# Create the descriptions.
8187
description_asset_resource_names = _create_multiple_text_assets(
82-
client, customer_id, ["Take to the air!", "Fly to the sky!",],
88+
client,
89+
customer_id,
90+
[
91+
"Take to the air!",
92+
"Fly to the sky!",
93+
],
8394
)
8495

8596
# The below methods create and return MutateOperations that we later
@@ -90,13 +101,18 @@ def main(client, customer_id, audience_id):
90101
# successfully or fail entirely, leaving no orphaned entities. See:
91102
# https://developers.google.com/google-ads/api/docs/mutating/overview
92103
campaign_budget_operation = _create_campaign_budget_operation(
93-
client, customer_id,
104+
client,
105+
customer_id,
94106
)
95-
performance_max_campaign_operation = _create_performance_max_campaign_operation(
96-
client, customer_id,
107+
performance_max_campaign_operation = (
108+
_create_performance_max_campaign_operation(
109+
client,
110+
customer_id,
111+
)
97112
)
98113
campaign_criterion_operations = _create_campaign_criterion_operations(
99-
client, customer_id,
114+
client,
115+
customer_id,
100116
)
101117
asset_group_operations = _create_asset_group_operation(
102118
client,
@@ -135,7 +151,8 @@ def main(client, customer_id, audience_id):
135151

136152
# [START add_performance_max_campaign_2]
137153
def _create_campaign_budget_operation(
138-
client, customer_id,
154+
client,
155+
customer_id,
139156
):
140157
"""Creates a MutateOperation that creates a new CampaignBudget.
141158
@@ -173,7 +190,8 @@ def _create_campaign_budget_operation(
173190

174191
# [START add_performance_max_campaign_3]
175192
def _create_performance_max_campaign_operation(
176-
client, customer_id,
193+
client,
194+
customer_id,
177195
):
178196
"""Creates a MutateOperation that creates a new Performance Max campaign.
179197
@@ -242,7 +260,8 @@ def _create_performance_max_campaign_operation(
242260

243261
# [START add_performance_max_campaign_4]
244262
def _create_campaign_criterion_operations(
245-
client, customer_id,
263+
client,
264+
customer_id,
246265
):
247266
"""Creates a list of MutateOperations that create new campaign criteria.
248267
@@ -273,8 +292,8 @@ def _create_campaign_criterion_operations(
273292
campaign_criterion.campaign = campaign_service.campaign_path(
274293
customer_id, _PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID
275294
)
276-
campaign_criterion.location.geo_target_constant = geo_target_constant_service.geo_target_constant_path(
277-
"1023191"
295+
campaign_criterion.location.geo_target_constant = (
296+
geo_target_constant_service.geo_target_constant_path("1023191")
278297
)
279298
campaign_criterion.negative = False
280299
operations.append(mutate_operation)
@@ -285,8 +304,8 @@ def _create_campaign_criterion_operations(
285304
campaign_criterion.campaign = campaign_service.campaign_path(
286305
customer_id, _PERFORMANCE_MAX_CAMPAIGN_TEMPORARY_ID
287306
)
288-
campaign_criterion.location.geo_target_constant = geo_target_constant_service.geo_target_constant_path(
289-
"1022762"
307+
campaign_criterion.location.geo_target_constant = (
308+
geo_target_constant_service.geo_target_constant_path("1022762")
290309
)
291310
campaign_criterion.negative = True
292311
operations.append(mutate_operation)
@@ -300,8 +319,8 @@ def _create_campaign_criterion_operations(
300319
# Set the language.
301320
# For a list of all language codes, see:
302321
# https://developers.google.com/google-ads/api/reference/data/codes-formats#expandable-7
303-
campaign_criterion.language.language_constant = googleads_service.language_constant_path(
304-
"1000"
322+
campaign_criterion.language.language_constant = (
323+
googleads_service.language_constant_path("1000")
305324
) # English
306325
operations.append(mutate_operation)
307326

@@ -335,7 +354,8 @@ def _create_multiple_text_assets(client, customer_id, texts):
335354

336355
# Send the operations in a single Mutate request.
337356
response = googleads_service.mutate(
338-
customer_id=customer_id, mutate_operations=operations,
357+
customer_id=customer_id,
358+
mutate_operations=operations,
339359
)
340360
asset_resource_names = []
341361
for result in response.mutate_operation_responses:
@@ -383,7 +403,8 @@ def _create_asset_group_operation(
383403
asset_group.final_mobile_urls.append("http://www.example.com")
384404
asset_group.status = client.enums.AssetGroupStatusEnum.PAUSED
385405
asset_group.resource_name = asset_group_service.asset_group_path(
386-
customer_id, _ASSET_GROUP_TEMPORARY_ID,
406+
customer_id,
407+
_ASSET_GROUP_TEMPORARY_ID,
387408
)
388409
operations.append(mutate_operation)
389410

@@ -407,7 +428,8 @@ def _create_asset_group_operation(
407428
asset_group_asset = mutate_operation.asset_group_asset_operation.create
408429
asset_group_asset.field_type = client.enums.AssetFieldTypeEnum.HEADLINE
409430
asset_group_asset.asset_group = asset_group_service.asset_group_path(
410-
customer_id, _ASSET_GROUP_TEMPORARY_ID,
431+
customer_id,
432+
_ASSET_GROUP_TEMPORARY_ID,
411433
)
412434
asset_group_asset.asset = resource_name
413435
operations.append(mutate_operation)
@@ -420,7 +442,8 @@ def _create_asset_group_operation(
420442
client.enums.AssetFieldTypeEnum.DESCRIPTION
421443
)
422444
asset_group_asset.asset_group = asset_group_service.asset_group_path(
423-
customer_id, _ASSET_GROUP_TEMPORARY_ID,
445+
customer_id,
446+
_ASSET_GROUP_TEMPORARY_ID,
424447
)
425448
asset_group_asset.asset = resource_name
426449
operations.append(mutate_operation)
@@ -508,7 +531,8 @@ def _create_and_link_text_asset(client, customer_id, text, field_type):
508531
asset_group_asset = mutate_operation.asset_group_asset_operation.create
509532
asset_group_asset.field_type = field_type
510533
asset_group_asset.asset_group = asset_group_service.asset_group_path(
511-
customer_id, _ASSET_GROUP_TEMPORARY_ID,
534+
customer_id,
535+
_ASSET_GROUP_TEMPORARY_ID,
512536
)
513537
asset_group_asset.asset = asset_service.asset_path(
514538
customer_id, next_temp_id
@@ -558,7 +582,8 @@ def _create_and_link_image_asset(
558582
asset_group_asset = mutate_operation.asset_group_asset_operation.create
559583
asset_group_asset.field_type = field_type
560584
asset_group_asset.asset_group = asset_group_service.asset_group_path(
561-
customer_id, _ASSET_GROUP_TEMPORARY_ID,
585+
customer_id,
586+
_ASSET_GROUP_TEMPORARY_ID,
562587
)
563588
asset_group_asset.asset = asset_service.asset_path(
564589
customer_id, next_temp_id
@@ -659,7 +684,10 @@ def _create_asset_group_signal_operation(client, customer_id, audience_id):
659684
help="The Google Ads customer ID.",
660685
)
661686
parser.add_argument(
662-
"-a", "--audience_id", type=str, help="The ID of an audience.",
687+
"-a",
688+
"--audience_id",
689+
type=str,
690+
help="The ID of an audience.",
663691
)
664692

665693
args = parser.parse_args()

examples/advanced_operations/add_responsive_search_ad_with_ad_customizer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,11 @@ def _create_responsive_search_ad_with_customization(
228228
help="The Google Ads customer ID.",
229229
)
230230
parser.add_argument(
231-
"-a", "--ad_group_id", type=str, required=True, help="An ad group ID.",
231+
"-a",
232+
"--ad_group_id",
233+
type=str,
234+
required=True,
235+
help="An ad group ID.",
232236
)
233237
parser.add_argument(
234238
"-n",

0 commit comments

Comments
 (0)