Skip to content

Commit

Permalink
Update sample google-ads.yaml file to illustrate the use_proto_plus
Browse files Browse the repository at this point in the history
… flag (#487)
  • Loading branch information
BenRKarl authored Aug 31, 2021
1 parent b31324d commit b0403e0
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 42 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dates for the above API versions.

Protobuf Messages
-----------------
Version `14.0.0_` of this library introduced the **required** `use_proto_plus`
Version `14.0.0`_ of this library introduced the **required** `use_proto_plus`
configuration option that specifies which type of protobuf message to use. For
information on why this flag is important and what the differences are between
the two message types, see the `Protobuf Messages`_ guide.
Expand Down
2 changes: 1 addition & 1 deletion examples/account_management/link_manager_to_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def main(client, customer_id, manager_customer_id):
)
)

manager_link.status = client.enums.ManagerLinkStatusEnum.PENDING
manager_link.status = client.enums.ManagerLinkStatusEnum.ACTIVE
client.copy_from(
manager_link_operation.update_mask,
protobuf_helpers.field_mask(None, manager_link._pb),
Expand Down
87 changes: 47 additions & 40 deletions google-ads.yaml
Original file line number Diff line number Diff line change
@@ -1,54 +1,62 @@
# Developer token
###############################################################################
# A developer token is required when making requests to the Google Ads API #
# regardless of whether you're using the OAuth2 or Service Account #
# configurations. To obtain a developer token see: #
# https://developers.google.com/google-ads/api/docs/first-call/dev-token #
###############################################################################
##########################################################################################
# A developer token is required when making requests to the Google Ads API regardless of #
# whether you're using the OAuth2 or Service Account configurations. To obtain a #
# developer token see: #
# https://developers.google.com/google-ads/api/docs/first-call/dev-token #
##########################################################################################
developer_token: INSERT_DEVELOPER_TOKEN_HERE

# Use proto plus
##########################################################################################
# This parameter specifies whether the client library should return proto-plus messages #
# or protobuf messages. This value should be explicitly set to either "True" or "False", #
# For more information on the differences between these two types, see our Protobuf #
# Messages guide: #
# https://developers.google.com/google-ads/api/docs/client-libs/python/protobuf-messages #
##########################################################################################
use_proto_plus: INSERT_USE_PROTO_PLUS_FLAG_HERE

# OAuth2 configuration
###############################################################################
# The below configuration parameters are used to authenticate using the #
# recommended OAuth2 flow. For more information on authenticating with OAuth2 #
# see: https://developers.google.com/google-ads/api/docs/oauth/overview #
###############################################################################
##########################################################################################
# The below configuration parameters are used to authenticate using the recommended #
# OAuth2 flow. For more information on authenticating with OAuth2 see: #
# https://developers.google.com/google-ads/api/docs/oauth/overview #
##########################################################################################
client_id: INSERT_OAUTH2_CLIENT_ID_HERE
client_secret: INSERT_OAUTH2_CLIENT_SECRET_HERE
refresh_token: INSERT_REFRESH_TOKEN_HERE

# Service Account configuration
###############################################################################
# To authenticate with a service account add the appropriate values to the #
# below configuration parameters and remove the three OAuth2 credentials #
# above. The "json_key_file_path" value should be a path to your local #
# private key json file, and "impersonated_email" should be the email address #
# that is being used to impersonate the credentials making requests. for more #
# information on service accounts, see: #
# https://developers.google.com/google-ads/api/docs/oauth/service-accounts #
###############################################################################
##########################################################################################
# To authenticate with a service account add the appropriate values to the below #
# configuration parameters and remove the three OAuth2 credentials above. The #
# "json_key_file_path" value should be a path to your local private key json file, and #
# "impersonated_email" should be the email address that is being used to impersonate the #
# credentials making requests. for more information on service accounts, see: #
# https://developers.google.com/google-ads/api/docs/oauth/service-accounts #
##########################################################################################
# json_key_file_path: INSERT_PATH_TO_JSON_KEY_FILE_HERE
# impersonated_email: INSERT_DOMAIN_WIDE_DELEGATION_ACCOUNT

# Login customer ID configuration
###############################################################################
# Required for manager accounts only: Specify the login customer ID used to #
# authenticate API calls. This will be the customer ID of the authenticated #
# manager account. It should be set without dashes, for example: 1234567890 #
# instead of 123-456-7890. You can also specify this later in code if your #
# application uses multiple manager account + OAuth pairs. #
###############################################################################
##########################################################################################
# Required for manager accounts only: Specify the login customer ID used to authenticate #
# API calls. This will be the customer ID of the authenticated manager account. It #
# should be set without dashes, for example: 1234567890 instead of 123-456-7890. You can #
# also specify this later in code if your application uses multiple manager account + #
# OAuth pairs. #
##########################################################################################
login_customer_id: INSERT_LOGIN_CUSTOMER_ID_HERE

# Logging configuration
###############################################################################
# Below you may specify the logging configuration. This will be provided as #
# an input to logging.config.dictConfig. Use the "level" block under the root #
# logger configuration to adjust the logging level. Note in the "format" #
# field that log messages are truncated to 5000 characters by default. You #
# can change this to any length by removing the ".5000" portion or changing #
# it to a different number. #
# #############################################################################
##########################################################################################
# Below you may specify the logging configuration. This will be provided as an input to #
# logging.config.dictConfig. Use the "level" block under the root logger configuration #
# to adjust the logging level. Note in the "format" field that log messages are #
# truncated to 5000 characters by default. You can change this to any length by removing #
# the ".5000" portion or changing it to a different number. #
# ########################################################################################
# logging:
# version: 1
# disable_existing_loggers: False
Expand All @@ -66,9 +74,8 @@ login_customer_id: INSERT_LOGIN_CUSTOMER_ID_HERE
# level: INFO

# Proxy configuration
###############################################################################
# Below you can specify an optional proxy configuration to be used by #
# requests. If you don't have username and password, just specify host and #
# port. #
# #############################################################################
##########################################################################################
# Below you can specify an optional proxy configuration to be used by requests. If you #
# don't have username and password, just specify host and port. #
# ########################################################################################
# http_proxy: http://user:password@localhost:8000

0 comments on commit b0403e0

Please sign in to comment.