Skip to content

Commit 7af0f39

Browse files
authored
Merge branch 'main' into add-type-hints-advanced-ops
2 parents 1926bf9 + dab8aa6 commit 7af0f39

File tree

3,080 files changed

+307059
-333765
lines changed

Some content is hidden

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

3,080 files changed

+307059
-333765
lines changed

ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
* 28.0.0
2+
- Google Ads API v21_0 release.
3+
- Updated to Google Ads API v19_0 and v20_0 to include EU political advertising changes.
4+
- Remove Google Ads API v18.
5+
- Add deprecation warnings for Python 3.9 users.
6+
- Add type annotations to all examples.
7+
- Add unit tests covering some examples.
8+
19
* 27.0.0
210
- Google Ads API v20_0 release.
311
- Remove Google Ads API v17.

examples/account_management/create_customer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727

2828
from google.ads.googleads.client import GoogleAdsClient
2929
from google.ads.googleads.errors import GoogleAdsException
30-
from google.ads.googleads.v20.resources.types.customer import Customer
31-
from google.ads.googleads.v20.services.services.customer_service.client import (
30+
from google.ads.googleads.v21.resources.types.customer import Customer
31+
from google.ads.googleads.v21.services.services.customer_service.client import (
3232
CustomerServiceClient,
3333
)
34-
from google.ads.googleads.v20.services.types.customer_service import (
34+
from google.ads.googleads.v21.services.types.customer_service import (
3535
CreateCustomerClientResponse,
3636
)
3737

@@ -91,7 +91,7 @@ def main(client: GoogleAdsClient, manager_customer_id: str) -> None:
9191

9292
# GoogleAdsClient will read the google-ads.yaml configuration file in the
9393
# home directory if none is specified.
94-
googleads_client = GoogleAdsClient.load_from_storage(version="v20")
94+
googleads_client = GoogleAdsClient.load_from_storage(version="v21")
9595

9696
try:
9797
main(googleads_client, args.manager_customer_id)

examples/account_management/get_account_hierarchy.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@
2828

2929
from google.ads.googleads.client import GoogleAdsClient
3030
from google.ads.googleads.errors import GoogleAdsException
31-
from google.ads.googleads.v20.services.services.google_ads_service.client import (
31+
from google.ads.googleads.v21.services.services.google_ads_service.client import (
3232
GoogleAdsServiceClient,
3333
)
34-
from google.ads.googleads.v20.services.services.customer_service.client import (
34+
from google.ads.googleads.v21.services.services.customer_service.client import (
3535
CustomerServiceClient,
3636
)
37-
from google.ads.googleads.v20.resources.types.customer_client import (
37+
from google.ads.googleads.v21.resources.types.customer_client import (
3838
CustomerClient,
3939
)
40-
from google.ads.googleads.v20.services.types.google_ads_service import (
40+
from google.ads.googleads.v21.services.types.google_ads_service import (
4141
SearchPagedResponse,
4242
GoogleAdsRow,
4343
)
@@ -238,7 +238,7 @@ def print_account_hierarchy(
238238

239239
# GoogleAdsClient will read the google-ads.yaml configuration file in the
240240
# home directory if none is specified.
241-
googleads_client = GoogleAdsClient.load_from_storage(version="v20")
241+
googleads_client = GoogleAdsClient.load_from_storage(version="v21")
242242
try:
243243
main(googleads_client, args.login_customer_id)
244244
except GoogleAdsException as ex:

examples/account_management/get_change_details.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828
from google.ads.googleads.client import GoogleAdsClient
2929
from google.ads.googleads.errors import GoogleAdsException
3030
from google.ads.googleads.util import get_nested_attr
31-
from google.ads.googleads.v20.services.services.google_ads_service.client import (
31+
from google.ads.googleads.v21.services.services.google_ads_service.client import (
3232
GoogleAdsServiceClient,
3333
)
34-
from google.ads.googleads.v20.services.types.google_ads_service import (
34+
from google.ads.googleads.v21.services.types.google_ads_service import (
3535
SearchGoogleAdsRequest,
3636
SearchPagedResponse,
3737
GoogleAdsRow,
3838
)
39-
from google.ads.googleads.v20.resources.types.change_event import ChangeEvent
39+
from google.ads.googleads.v21.resources.types.change_event import ChangeEvent
4040

4141

4242
# [START get_change_details]
@@ -218,7 +218,7 @@ def main(client: GoogleAdsClient, customer_id: str) -> None:
218218

219219
# GoogleAdsClient will read the google-ads.yaml configuration file in the
220220
# home directory if none is specified.
221-
googleads_client = GoogleAdsClient.load_from_storage(version="v20")
221+
googleads_client = GoogleAdsClient.load_from_storage(version="v21")
222222
try:
223223
main(googleads_client, args.customer_id)
224224
except GoogleAdsException as ex:

examples/account_management/get_change_summary.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222

2323
from google.ads.googleads.client import GoogleAdsClient
2424
from google.ads.googleads.errors import GoogleAdsException
25-
from google.ads.googleads.v20.services.services.google_ads_service.client import (
25+
from google.ads.googleads.v21.services.services.google_ads_service.client import (
2626
GoogleAdsServiceClient,
2727
)
28-
from google.ads.googleads.v20.services.types.google_ads_service import (
28+
from google.ads.googleads.v21.services.types.google_ads_service import (
2929
SearchGoogleAdsRequest,
3030
SearchPagedResponse,
3131
GoogleAdsRow,
3232
)
33-
from google.ads.googleads.v20.resources.types.change_status import ChangeStatus
33+
from google.ads.googleads.v21.resources.types.change_status import ChangeStatus
3434

3535

3636
# [START get_change_summary]
@@ -110,7 +110,7 @@ def main(client: GoogleAdsClient, customer_id: str) -> None:
110110

111111
# GoogleAdsClient will read the google-ads.yaml configuration file in the
112112
# home directory if none is specified.
113-
googleads_client = GoogleAdsClient.load_from_storage(version="v20")
113+
googleads_client = GoogleAdsClient.load_from_storage(version="v21")
114114

115115
try:
116116
main(googleads_client, args.customer_id)

examples/account_management/invite_user_with_access_role.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323

2424
from google.ads.googleads.client import GoogleAdsClient
2525
from google.ads.googleads.errors import GoogleAdsException
26-
from google.ads.googleads.v20.services.services.customer_user_access_invitation_service.client import (
26+
from google.ads.googleads.v21.services.services.customer_user_access_invitation_service.client import (
2727
CustomerUserAccessInvitationServiceClient,
2828
)
29-
from google.ads.googleads.v20.services.types.customer_user_access_invitation_service import (
29+
from google.ads.googleads.v21.services.types.customer_user_access_invitation_service import (
3030
CustomerUserAccessInvitationOperation,
3131
MutateCustomerUserAccessInvitationResponse,
3232
)
33-
from google.ads.googleads.v20.resources.types.customer_user_access_invitation import (
33+
from google.ads.googleads.v21.resources.types.customer_user_access_invitation import (
3434
CustomerUserAccessInvitation,
3535
)
3636

@@ -115,7 +115,7 @@ def main(
115115

116116
# GoogleAdsClient will read the google-ads.yaml configuration file in the
117117
# home directory if none is specified.
118-
googleads_client = GoogleAdsClient.load_from_storage(version="v20")
118+
googleads_client = GoogleAdsClient.load_from_storage(version="v21")
119119

120120
try:
121121
main(

examples/account_management/link_manager_to_client.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,31 @@
2222

2323
from google.ads.googleads.client import GoogleAdsClient
2424
from google.ads.googleads.errors import GoogleAdsException
25-
from google.ads.googleads.v20.services.services.customer_client_link_service.client import (
25+
from google.ads.googleads.v21.services.services.customer_client_link_service.client import (
2626
CustomerClientLinkServiceClient,
2727
)
28-
from google.ads.googleads.v20.services.types.customer_client_link_service import (
28+
from google.ads.googleads.v21.services.types.customer_client_link_service import (
2929
CustomerClientLinkOperation,
3030
MutateCustomerClientLinkResponse,
3131
)
32-
from google.ads.googleads.v20.resources.types.customer_client_link import (
32+
from google.ads.googleads.v21.resources.types.customer_client_link import (
3333
CustomerClientLink,
3434
)
35-
from google.ads.googleads.v20.services.services.google_ads_service.client import (
35+
from google.ads.googleads.v21.services.services.google_ads_service.client import (
3636
GoogleAdsServiceClient,
3737
)
38-
from google.ads.googleads.v20.services.types.google_ads_service import (
38+
from google.ads.googleads.v21.services.types.google_ads_service import (
3939
SearchPagedResponse,
4040
GoogleAdsRow,
4141
)
42-
from google.ads.googleads.v20.services.services.customer_manager_link_service.client import (
42+
from google.ads.googleads.v21.services.services.customer_manager_link_service.client import (
4343
CustomerManagerLinkServiceClient,
4444
)
45-
from google.ads.googleads.v20.services.types.customer_manager_link_service import (
45+
from google.ads.googleads.v21.services.types.customer_manager_link_service import (
4646
CustomerManagerLinkOperation,
4747
MutateCustomerManagerLinkResponse,
4848
)
49-
from google.ads.googleads.v20.resources.types.customer_manager_link import (
49+
from google.ads.googleads.v21.resources.types.customer_manager_link import (
5050
CustomerManagerLink,
5151
)
5252

@@ -179,7 +179,7 @@ def main(
179179

180180
# GoogleAdsClient will read the google-ads.yaml configuration file in the
181181
# home directory if none is specified.
182-
googleads_client = GoogleAdsClient.load_from_storage(version="v20")
182+
googleads_client = GoogleAdsClient.load_from_storage(version="v21")
183183
try:
184184
main(googleads_client, args.customer_id, args.manager_customer_id)
185185
except GoogleAdsException as ex:

examples/account_management/list_accessible_customers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626

2727
from google.ads.googleads.client import GoogleAdsClient
2828
from google.ads.googleads.errors import GoogleAdsException
29-
from google.ads.googleads.v20.services.services.customer_service.client import (
29+
from google.ads.googleads.v21.services.services.customer_service.client import (
3030
CustomerServiceClient,
3131
)
32-
from google.ads.googleads.v20.services.types.customer_service import (
32+
from google.ads.googleads.v21.services.types.customer_service import (
3333
ListAccessibleCustomersResponse,
3434
)
3535

@@ -55,7 +55,7 @@ def main(client: GoogleAdsClient) -> None:
5555
if __name__ == "__main__":
5656
# GoogleAdsClient will read the google-ads.yaml configuration file in the
5757
# home directory if none is specified.
58-
googleads_client = GoogleAdsClient.load_from_storage(version="v20")
58+
googleads_client = GoogleAdsClient.load_from_storage(version="v21")
5959

6060
try:
6161
main(googleads_client)

examples/account_management/update_user_access.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@
2626

2727
from google.ads.googleads.client import GoogleAdsClient
2828
from google.ads.googleads.errors import GoogleAdsException
29-
from google.ads.googleads.v20.services.services.google_ads_service.client import (
29+
from google.ads.googleads.v21.services.services.google_ads_service.client import (
3030
GoogleAdsServiceClient,
3131
)
32-
from google.ads.googleads.v20.services.types.google_ads_service import (
32+
from google.ads.googleads.v21.services.types.google_ads_service import (
3333
SearchGoogleAdsRequest,
3434
SearchPagedResponse,
3535
)
36-
from google.ads.googleads.v20.resources.types.customer_user_access import (
36+
from google.ads.googleads.v21.resources.types.customer_user_access import (
3737
CustomerUserAccess,
3838
)
39-
from google.ads.googleads.v20.services.services.customer_user_access_service.client import (
39+
from google.ads.googleads.v21.services.services.customer_user_access_service.client import (
4040
CustomerUserAccessServiceClient,
4141
)
42-
from google.ads.googleads.v20.services.types.customer_user_access_service import (
42+
from google.ads.googleads.v21.services.types.customer_user_access_service import (
4343
CustomerUserAccessOperation,
4444
MutateCustomerUserAccessResponse,
4545
)
@@ -219,7 +219,7 @@ def modify_user_access(
219219

220220
# GoogleAdsClient will read the google-ads.yaml configuration file in the
221221
# home directory if none is specified.
222-
googleads_client = GoogleAdsClient.load_from_storage(version="v20")
222+
googleads_client = GoogleAdsClient.load_from_storage(version="v21")
223223
try:
224224
main(
225225
googleads_client,

examples/account_management/verify_advertiser_identity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def start_identity_verification(
183183

184184
# GoogleAdsClient will read the google-ads.yaml configuration file in the
185185
# home directory if none is specified.
186-
googleads_client = GoogleAdsClient.load_from_storage(version="v20")
186+
googleads_client = GoogleAdsClient.load_from_storage(version="v21")
187187

188188
try:
189189
main(googleads_client, args.customer_id)

0 commit comments

Comments
 (0)