Skip to content

Commit b0403e0

Browse files
authored
Update sample google-ads.yaml file to illustrate the use_proto_plus flag (#487)
1 parent b31324d commit b0403e0

File tree

3 files changed

+49
-42
lines changed

3 files changed

+49
-42
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dates for the above API versions.
4242

4343
Protobuf Messages
4444
-----------------
45-
Version `14.0.0_` of this library introduced the **required** `use_proto_plus`
45+
Version `14.0.0`_ of this library introduced the **required** `use_proto_plus`
4646
configuration option that specifies which type of protobuf message to use. For
4747
information on why this flag is important and what the differences are between
4848
the two message types, see the `Protobuf Messages`_ guide.

examples/account_management/link_manager_to_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def main(client, customer_id, manager_customer_id):
9191
)
9292
)
9393

94-
manager_link.status = client.enums.ManagerLinkStatusEnum.PENDING
94+
manager_link.status = client.enums.ManagerLinkStatusEnum.ACTIVE
9595
client.copy_from(
9696
manager_link_operation.update_mask,
9797
protobuf_helpers.field_mask(None, manager_link._pb),

google-ads.yaml

Lines changed: 47 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,62 @@
11
# Developer token
2-
###############################################################################
3-
# A developer token is required when making requests to the Google Ads API #
4-
# regardless of whether you're using the OAuth2 or Service Account #
5-
# configurations. To obtain a developer token see: #
6-
# https://developers.google.com/google-ads/api/docs/first-call/dev-token #
7-
###############################################################################
2+
##########################################################################################
3+
# A developer token is required when making requests to the Google Ads API regardless of #
4+
# whether you're using the OAuth2 or Service Account configurations. To obtain a #
5+
# developer token see: #
6+
# https://developers.google.com/google-ads/api/docs/first-call/dev-token #
7+
##########################################################################################
88
developer_token: INSERT_DEVELOPER_TOKEN_HERE
99

10+
# Use proto plus
11+
##########################################################################################
12+
# This parameter specifies whether the client library should return proto-plus messages #
13+
# or protobuf messages. This value should be explicitly set to either "True" or "False", #
14+
# For more information on the differences between these two types, see our Protobuf #
15+
# Messages guide: #
16+
# https://developers.google.com/google-ads/api/docs/client-libs/python/protobuf-messages #
17+
##########################################################################################
18+
use_proto_plus: INSERT_USE_PROTO_PLUS_FLAG_HERE
19+
1020
# OAuth2 configuration
11-
###############################################################################
12-
# The below configuration parameters are used to authenticate using the #
13-
# recommended OAuth2 flow. For more information on authenticating with OAuth2 #
14-
# see: https://developers.google.com/google-ads/api/docs/oauth/overview #
15-
###############################################################################
21+
##########################################################################################
22+
# The below configuration parameters are used to authenticate using the recommended #
23+
# OAuth2 flow. For more information on authenticating with OAuth2 see: #
24+
# https://developers.google.com/google-ads/api/docs/oauth/overview #
25+
##########################################################################################
1626
client_id: INSERT_OAUTH2_CLIENT_ID_HERE
1727
client_secret: INSERT_OAUTH2_CLIENT_SECRET_HERE
1828
refresh_token: INSERT_REFRESH_TOKEN_HERE
1929

2030
# Service Account configuration
21-
###############################################################################
22-
# To authenticate with a service account add the appropriate values to the #
23-
# below configuration parameters and remove the three OAuth2 credentials #
24-
# above. The "json_key_file_path" value should be a path to your local #
25-
# private key json file, and "impersonated_email" should be the email address #
26-
# that is being used to impersonate the credentials making requests. for more #
27-
# information on service accounts, see: #
28-
# https://developers.google.com/google-ads/api/docs/oauth/service-accounts #
29-
###############################################################################
31+
##########################################################################################
32+
# To authenticate with a service account add the appropriate values to the below #
33+
# configuration parameters and remove the three OAuth2 credentials above. The #
34+
# "json_key_file_path" value should be a path to your local private key json file, and #
35+
# "impersonated_email" should be the email address that is being used to impersonate the #
36+
# credentials making requests. for more information on service accounts, see: #
37+
# https://developers.google.com/google-ads/api/docs/oauth/service-accounts #
38+
##########################################################################################
3039
# json_key_file_path: INSERT_PATH_TO_JSON_KEY_FILE_HERE
3140
# impersonated_email: INSERT_DOMAIN_WIDE_DELEGATION_ACCOUNT
3241

3342
# Login customer ID configuration
34-
###############################################################################
35-
# Required for manager accounts only: Specify the login customer ID used to #
36-
# authenticate API calls. This will be the customer ID of the authenticated #
37-
# manager account. It should be set without dashes, for example: 1234567890 #
38-
# instead of 123-456-7890. You can also specify this later in code if your #
39-
# application uses multiple manager account + OAuth pairs. #
40-
###############################################################################
43+
##########################################################################################
44+
# Required for manager accounts only: Specify the login customer ID used to authenticate #
45+
# API calls. This will be the customer ID of the authenticated manager account. It #
46+
# should be set without dashes, for example: 1234567890 instead of 123-456-7890. You can #
47+
# also specify this later in code if your application uses multiple manager account + #
48+
# OAuth pairs. #
49+
##########################################################################################
4150
login_customer_id: INSERT_LOGIN_CUSTOMER_ID_HERE
4251

4352
# Logging configuration
44-
###############################################################################
45-
# Below you may specify the logging configuration. This will be provided as #
46-
# an input to logging.config.dictConfig. Use the "level" block under the root #
47-
# logger configuration to adjust the logging level. Note in the "format" #
48-
# field that log messages are truncated to 5000 characters by default. You #
49-
# can change this to any length by removing the ".5000" portion or changing #
50-
# it to a different number. #
51-
# #############################################################################
53+
##########################################################################################
54+
# Below you may specify the logging configuration. This will be provided as an input to #
55+
# logging.config.dictConfig. Use the "level" block under the root logger configuration #
56+
# to adjust the logging level. Note in the "format" field that log messages are #
57+
# truncated to 5000 characters by default. You can change this to any length by removing #
58+
# the ".5000" portion or changing it to a different number. #
59+
# ########################################################################################
5260
# logging:
5361
# version: 1
5462
# disable_existing_loggers: False
@@ -66,9 +74,8 @@ login_customer_id: INSERT_LOGIN_CUSTOMER_ID_HERE
6674
# level: INFO
6775

6876
# Proxy configuration
69-
###############################################################################
70-
# Below you can specify an optional proxy configuration to be used by #
71-
# requests. If you don't have username and password, just specify host and #
72-
# port. #
73-
# #############################################################################
77+
##########################################################################################
78+
# Below you can specify an optional proxy configuration to be used by requests. If you #
79+
# don't have username and password, just specify host and port. #
80+
# ########################################################################################
7481
# http_proxy: http://user:password@localhost:8000

0 commit comments

Comments
 (0)