{"action":"created","comment":{"url":"https://api.github.com/repos/googleads/google-ads-python/pulls/comments/243330378","pull_request_review_id":187072064,"id":243330378,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MzMzMDM3OA==","diff_hunk":"@@ -0,0 +1,52 @@\n+# Copyright 2018 Google LLC\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#     https://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+\"\"\"This example lists the resource names for the customer accounts that the\n+authenticating user has access to.\n+\"\"\"\n+\n+from __future__ import absolute_import\n+\n+import argparse\n+import six\n+import sys\n+\n+import google.ads.google_ads.client\n+\n+def main(client):\n+    customer_service = client.get_service('CustomerService')\n+\n+    try:\n+        accessible_customers = customer_service.list_accessible_customers()\n+    except google.ads.google_ads.errors.GoogleAdsException as ex:\n+        print('Request with ID \"%s\" failed with status \"%s\" and includes the '\n+              'following errors:' % (ex.request_id, ex.error.code().name))\n+        for error in ex.failure.errors:\n+            print('\\tError with message \"%s\".' % error.message)\n+            if error.location:\n+                for field_path_element in error.location.field_path_elements:\n+                    print('\\t\\tOn field: %s' % field_path_element.field_name)\n+        sys.exit(1)\n+\n+    resource_names = accessible_customers.resource_names\n+\n+    for resource_name in resource_names:\n+        print('Customer account resource name: %s' % resource_name)","path":"examples/v0/account_management/get_accessible_customers.py","position":44,"original_position":44,"commit_id":"f735fb3452526567f2d929c9d2521e92fb4c276b","original_commit_id":"f735fb3452526567f2d929c9d2521e92fb4c276b","user":{"login":"wihl","id":1339705,"node_id":"MDQ6VXNlcjEzMzk3MDU=","avatar_url":"https://avatars0.githubusercontent.com/u/1339705?v=4","gravatar_id":"","url":"https://api.github.com/users/wihl","html_url":"https://github.com/wihl","followers_url":"https://api.github.com/users/wihl/followers","following_url":"https://api.github.com/users/wihl/following{/other_user}","gists_url":"https://api.github.com/users/wihl/gists{/gist_id}","starred_url":"https://api.github.com/users/wihl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wihl/subscriptions","organizations_url":"https://api.github.com/users/wihl/orgs","repos_url":"https://api.github.com/users/wihl/repos","events_url":"https://api.github.com/users/wihl/events{/privacy}","received_events_url":"https://api.github.com/users/wihl/received_events","type":"User","site_admin":false},"body":"some customers have thousands of accounts. I suggest you put in a max limit to clip the output after say 200 items.","created_at":"2018-12-20T16:15:53Z","updated_at":"2018-12-20T16:15:53Z","html_url":"https://github.com/googleads/google-ads-python/pull/18#discussion_r243330378","pull_request_url":"https://api.github.com/repos/googleads/google-ads-python/pulls/18","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/googleads/google-ads-python/pulls/comments/243330378"},"html":{"href":"https://github.com/googleads/google-ads-python/pull/18#discussion_r243330378"},"pull_request":{"href":"https://api.github.com/repos/googleads/google-ads-python/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/googleads/google-ads-python/pulls/18","id":240218954,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwMjE4OTU0","html_url":"https://github.com/googleads/google-ads-python/pull/18","diff_url":"https://github.com/googleads/google-ads-python/pull/18.diff","patch_url":"https://github.com/googleads/google-ads-python/pull/18.patch","issue_url":"https://api.github.com/repos/googleads/google-ads-python/issues/18","number":18,"state":"open","locked":false,"title":"Adding account_management/list_accessible_customers example","user":{"login":"BenRKarl","id":5302342,"node_id":"MDQ6VXNlcjUzMDIzNDI=","avatar_url":"https://avatars0.githubusercontent.com/u/5302342?v=4","gravatar_id":"","url":"https://api.github.com/users/BenRKarl","html_url":"https://github.com/BenRKarl","followers_url":"https://api.github.com/users/BenRKarl/followers","following_url":"https://api.github.com/users/BenRKarl/following{/other_user}","gists_url":"https://api.github.com/users/BenRKarl/gists{/gist_id}","starred_url":"https://api.github.com/users/BenRKarl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenRKarl/subscriptions","organizations_url":"https://api.github.com/users/BenRKarl/orgs","repos_url":"https://api.github.com/users/BenRKarl/repos","events_url":"https://api.github.com/users/BenRKarl/events{/privacy}","received_events_url":"https://api.github.com/users/BenRKarl/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-20T15:58:06Z","updated_at":"2018-12-20T16:15:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"323d97e7cc755d599949407fa772441c2f9ec6e1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/googleads/google-ads-python/pulls/18/commits","review_comments_url":"https://api.github.com/repos/googleads/google-ads-python/pulls/18/comments","review_comment_url":"https://api.github.com/repos/googleads/google-ads-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/googleads/google-ads-python/issues/18/comments","statuses_url":"https://api.github.com/repos/googleads/google-ads-python/statuses/f735fb3452526567f2d929c9d2521e92fb4c276b","head":{"label":"googleads:list-customers-example","ref":"list-customers-example","sha":"f735fb3452526567f2d929c9d2521e92fb4c276b","user":{"login":"googleads","id":4551618,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1NTE2MTg=","avatar_url":"https://avatars2.githubusercontent.com/u/4551618?v=4","gravatar_id":"","url":"https://api.github.com/users/googleads","html_url":"https://github.com/googleads","followers_url":"https://api.github.com/users/googleads/followers","following_url":"https://api.github.com/users/googleads/following{/other_user}","gists_url":"https://api.github.com/users/googleads/gists{/gist_id}","starred_url":"https://api.github.com/users/googleads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googleads/subscriptions","organizations_url":"https://api.github.com/users/googleads/orgs","repos_url":"https://api.github.com/users/googleads/repos","events_url":"https://api.github.com/users/googleads/events{/privacy}","received_events_url":"https://api.github.com/users/googleads/received_events","type":"Organization","site_admin":false},"repo":{"id":143435091,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM0MzUwOTE=","name":"google-ads-python","full_name":"googleads/google-ads-python","private":false,"owner":{"login":"googleads","id":4551618,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1NTE2MTg=","avatar_url":"https://avatars2.githubusercontent.com/u/4551618?v=4","gravatar_id":"","url":"https://api.github.com/users/googleads","html_url":"https://github.com/googleads","followers_url":"https://api.github.com/users/googleads/followers","following_url":"https://api.github.com/users/googleads/following{/other_user}","gists_url":"https://api.github.com/users/googleads/gists{/gist_id}","starred_url":"https://api.github.com/users/googleads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googleads/subscriptions","organizations_url":"https://api.github.com/users/googleads/orgs","repos_url":"https://api.github.com/users/googleads/repos","events_url":"https://api.github.com/users/googleads/events{/privacy}","received_events_url":"https://api.github.com/users/googleads/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/googleads/google-ads-python","description":"Google Ads API Client Library for Python","fork":false,"url":"https://api.github.com/repos/googleads/google-ads-python","forks_url":"https://api.github.com/repos/googleads/google-ads-python/forks","keys_url":"https://api.github.com/repos/googleads/google-ads-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/googleads/google-ads-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/googleads/google-ads-python/teams","hooks_url":"https://api.github.com/repos/googleads/google-ads-python/hooks","issue_events_url":"https://api.github.com/repos/googleads/google-ads-python/issues/events{/number}","events_url":"https://api.github.com/repos/googleads/google-ads-python/events","assignees_url":"https://api.github.com/repos/googleads/google-ads-python/assignees{/user}","branches_url":"https://api.github.com/repos/googleads/google-ads-python/branches{/branch}","tags_url":"https://api.github.com/repos/googleads/google-ads-python/tags","blobs_url":"https://api.github.com/repos/googleads/google-ads-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/googleads/google-ads-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/googleads/google-ads-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/googleads/google-ads-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/googleads/google-ads-python/statuses/{sha}","languages_url":"https://api.github.com/repos/googleads/google-ads-python/languages","stargazers_url":"https://api.github.com/repos/googleads/google-ads-python/stargazers","contributors_url":"https://api.github.com/repos/googleads/google-ads-python/contributors","subscribers_url":"https://api.github.com/repos/googleads/google-ads-python/subscribers","subscription_url":"https://api.github.com/repos/googleads/google-ads-python/subscription","commits_url":"https://api.github.com/repos/googleads/google-ads-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/googleads/google-ads-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/googleads/google-ads-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/googleads/google-ads-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/googleads/google-ads-python/contents/{+path}","compare_url":"https://api.github.com/repos/googleads/google-ads-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/googleads/google-ads-python/merges","archive_url":"https://api.github.com/repos/googleads/google-ads-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/googleads/google-ads-python/downloads","issues_url":"https://api.github.com/repos/googleads/google-ads-python/issues{/number}","pulls_url":"https://api.github.com/repos/googleads/google-ads-python/pulls{/number}","milestones_url":"https://api.github.com/repos/googleads/google-ads-python/milestones{/number}","notifications_url":"https://api.github.com/repos/googleads/google-ads-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/googleads/google-ads-python/labels{/name}","releases_url":"https://api.github.com/repos/googleads/google-ads-python/releases{/id}","deployments_url":"https://api.github.com/repos/googleads/google-ads-python/deployments","created_at":"2018-08-03T14:08:04Z","updated_at":"2018-12-20T16:09:26Z","pushed_at":"2018-12-20T16:11:29Z","git_url":"git://github.com/googleads/google-ads-python.git","ssh_url":"git@github.com:googleads/google-ads-python.git","clone_url":"https://github.com/googleads/google-ads-python.git","svn_url":"https://github.com/googleads/google-ads-python","homepage":null,"size":918,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":4,"open_issues":8,"watchers":9,"default_branch":"master"}},"base":{"label":"googleads:master","ref":"master","sha":"951da24e142d0c10a86191e1e065520ea24ddbd4","user":{"login":"googleads","id":4551618,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1NTE2MTg=","avatar_url":"https://avatars2.githubusercontent.com/u/4551618?v=4","gravatar_id":"","url":"https://api.github.com/users/googleads","html_url":"https://github.com/googleads","followers_url":"https://api.github.com/users/googleads/followers","following_url":"https://api.github.com/users/googleads/following{/other_user}","gists_url":"https://api.github.com/users/googleads/gists{/gist_id}","starred_url":"https://api.github.com/users/googleads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googleads/subscriptions","organizations_url":"https://api.github.com/users/googleads/orgs","repos_url":"https://api.github.com/users/googleads/repos","events_url":"https://api.github.com/users/googleads/events{/privacy}","received_events_url":"https://api.github.com/users/googleads/received_events","type":"Organization","site_admin":false},"repo":{"id":143435091,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM0MzUwOTE=","name":"google-ads-python","full_name":"googleads/google-ads-python","private":false,"owner":{"login":"googleads","id":4551618,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1NTE2MTg=","avatar_url":"https://avatars2.githubusercontent.com/u/4551618?v=4","gravatar_id":"","url":"https://api.github.com/users/googleads","html_url":"https://github.com/googleads","followers_url":"https://api.github.com/users/googleads/followers","following_url":"https://api.github.com/users/googleads/following{/other_user}","gists_url":"https://api.github.com/users/googleads/gists{/gist_id}","starred_url":"https://api.github.com/users/googleads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/googleads/subscriptions","organizations_url":"https://api.github.com/users/googleads/orgs","repos_url":"https://api.github.com/users/googleads/repos","events_url":"https://api.github.com/users/googleads/events{/privacy}","received_events_url":"https://api.github.com/users/googleads/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/googleads/google-ads-python","description":"Google Ads API Client Library for Python","fork":false,"url":"https://api.github.com/repos/googleads/google-ads-python","forks_url":"https://api.github.com/repos/googleads/google-ads-python/forks","keys_url":"https://api.github.com/repos/googleads/google-ads-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/googleads/google-ads-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/googleads/google-ads-python/teams","hooks_url":"https://api.github.com/repos/googleads/google-ads-python/hooks","issue_events_url":"https://api.github.com/repos/googleads/google-ads-python/issues/events{/number}","events_url":"https://api.github.com/repos/googleads/google-ads-python/events","assignees_url":"https://api.github.com/repos/googleads/google-ads-python/assignees{/user}","branches_url":"https://api.github.com/repos/googleads/google-ads-python/branches{/branch}","tags_url":"https://api.github.com/repos/googleads/google-ads-python/tags","blobs_url":"https://api.github.com/repos/googleads/google-ads-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/googleads/google-ads-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/googleads/google-ads-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/googleads/google-ads-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/googleads/google-ads-python/statuses/{sha}","languages_url":"https://api.github.com/repos/googleads/google-ads-python/languages","stargazers_url":"https://api.github.com/repos/googleads/google-ads-python/stargazers","contributors_url":"https://api.github.com/repos/googleads/google-ads-python/contributors","subscribers_url":"https://api.github.com/repos/googleads/google-ads-python/subscribers","subscription_url":"https://api.github.com/repos/googleads/google-ads-python/subscription","commits_url":"https://api.github.com/repos/googleads/google-ads-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/googleads/google-ads-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/googleads/google-ads-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/googleads/google-ads-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/googleads/google-ads-python/contents/{+path}","compare_url":"https://api.github.com/repos/googleads/google-ads-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/googleads/google-ads-python/merges","archive_url":"https://api.github.com/repos/googleads/google-ads-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/googleads/google-ads-python/downloads","issues_url":"https://api.github.com/repos/googleads/google-ads-python/issues{/number}","pulls_url":"https://api.github.com/repos/googleads/google-ads-python/pulls{/number}","milestones_url":"https://api.github.com/repos/googleads/google-ads-python/milestones{/number}","notifications_url":"https://api.github.com/repos/googleads/google-ads-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/googleads/google-ads-python/labels{/name}","releases_url":"https://api.github.com/repos/googleads/google-ads-python/releases{/id}","deployments_url":"https://api.github.com/repos/googleads/google-ads-python/deployments","created_at":"2018-08-03T14:08:04Z","updated_at":"2018-12-20T16:09:26Z","pushed_at":"2018-12-20T16:11:29Z","git_url":"git://github.com/googleads/google-ads-python.git","ssh_url":"git@github.com:googleads/google-ads-python.git","clone_url":"https://github.com/googleads/google-ads-python.git","svn_url":"https://github.com/googleads/google-ads-python","homepage":null,"size":918,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":4,"open_issues":8,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/googleads/google-ads-python/pulls/18"},"html":{"href":"https://github.com/googleads/google-ads-python/pull/18"},"issue":{"href":"https://api.github.com/repos/googleads/google-ads-python/issues/18"},"comments":{"href":"https://api.github.com/repos/googleads/google-ads-python/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/googleads/google-ads-python/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/googleads/google-ads-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/googleads/google-ads-python/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/googleads/google-ads-python/statuses/f735fb3452526567f2d929c9d2521e92fb4c276b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"wihl"}}