{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/comments/88296404","pull_request_review_id":8874418,"id":88296404,"diff_hunk":"@@ -0,0 +1,59 @@\n+# Copyright 2016 Google Inc. All Rights Reserved.\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+#     http://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+\n+\"\"\"The Python GRPC Bookstore Client Example.\"\"\"\n+\n+import argparse\n+\n+import bookstore_pb2\n+\n+from google.protobuf import empty_pb2\n+from grpc.beta import implementations\n+\n+\n+def _add_endpoints_metadata(api_key):\n+  def add_metadata(metadata):\n+    if metadata:\n+      for k, v in metadata:\n+        yield (k, v)\n+    if api_key:\n+      yield ('x-api-key', api_key)\n+\n+  return add_metadata\n+\n+\n+def _run():\n+  \"\"\"Runs a basic ListShelves call against a GRPC server.\"\"\"\n+\n+  parser = argparse.ArgumentParser(\n+      description='List bookstore shelves',\n+      formatter_class=argparse.ArgumentDefaultsHelpFormatter)\n+  parser.add_argument('--host', default='localhost',\n+                      help='The host to connect to')\n+  parser.add_argument('--port', type=int, default=8000,\n+                      help='The port to connect to')\n+  parser.add_argument('--timeout', type=int, default=10,\n+                      help='The call timeout, in seconds')\n+  parser.add_argument('--api_key', help='The API key to use for the call')\n+  args = parser.parse_args()\n+\n+  channel = implementations.insecure_channel(args.host, args.port)\n+  stub = bookstore_pb2.beta_create_Bookstore_stub(","path":"endpoints/bookstore-grpc/bookstore_client.py","position":52,"original_position":52,"commit_id":"e47fbf6e00e9970c86aa361ce6fdf7cd15d75776","original_commit_id":"e47fbf6e00e9970c86aa361ce6fdf7cd15d75776","user":{"login":"jeffmendoza","id":771387,"avatar_url":"https://avatars.githubusercontent.com/u/771387?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffmendoza","html_url":"https://github.com/jeffmendoza","followers_url":"https://api.github.com/users/jeffmendoza/followers","following_url":"https://api.github.com/users/jeffmendoza/following{/other_user}","gists_url":"https://api.github.com/users/jeffmendoza/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffmendoza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffmendoza/subscriptions","organizations_url":"https://api.github.com/users/jeffmendoza/orgs","repos_url":"https://api.github.com/users/jeffmendoza/repos","events_url":"https://api.github.com/users/jeffmendoza/events{/privacy}","received_events_url":"https://api.github.com/users/jeffmendoza/received_events","type":"User","site_admin":false},"body":"Isn't beta needed for the `metadata_transformer` ?","created_at":"2016-11-16T18:16:41Z","updated_at":"2016-11-16T18:16:41Z","html_url":"https://github.com/GoogleCloudPlatform/python-docs-samples/pull/660#discussion_r88296404","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/660","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/comments/88296404"},"html":{"href":"https://github.com/GoogleCloudPlatform/python-docs-samples/pull/660#discussion_r88296404"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/660"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/660","id":93909311,"html_url":"https://github.com/GoogleCloudPlatform/python-docs-samples/pull/660","diff_url":"https://github.com/GoogleCloudPlatform/python-docs-samples/pull/660.diff","patch_url":"https://github.com/GoogleCloudPlatform/python-docs-samples/pull/660.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/660","number":660,"state":"open","locked":false,"title":"add grpc bookstore python samples","user":{"login":"wlu2016","id":15929996,"avatar_url":"https://avatars.githubusercontent.com/u/15929996?v=3","gravatar_id":"","url":"https://api.github.com/users/wlu2016","html_url":"https://github.com/wlu2016","followers_url":"https://api.github.com/users/wlu2016/followers","following_url":"https://api.github.com/users/wlu2016/following{/other_user}","gists_url":"https://api.github.com/users/wlu2016/gists{/gist_id}","starred_url":"https://api.github.com/users/wlu2016/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wlu2016/subscriptions","organizations_url":"https://api.github.com/users/wlu2016/orgs","repos_url":"https://api.github.com/users/wlu2016/repos","events_url":"https://api.github.com/users/wlu2016/events{/privacy}","received_events_url":"https://api.github.com/users/wlu2016/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-16T06:36:17Z","updated_at":"2016-11-16T18:16:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"081685bf3393c5ce6edc1ec9f7fc8addd03122ec","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/660/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/660/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/660/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/statuses/e47fbf6e00e9970c86aa361ce6fdf7cd15d75776","head":{"label":"wlu2016:master","ref":"master","sha":"e47fbf6e00e9970c86aa361ce6fdf7cd15d75776","user":{"login":"wlu2016","id":15929996,"avatar_url":"https://avatars.githubusercontent.com/u/15929996?v=3","gravatar_id":"","url":"https://api.github.com/users/wlu2016","html_url":"https://github.com/wlu2016","followers_url":"https://api.github.com/users/wlu2016/followers","following_url":"https://api.github.com/users/wlu2016/following{/other_user}","gists_url":"https://api.github.com/users/wlu2016/gists{/gist_id}","starred_url":"https://api.github.com/users/wlu2016/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wlu2016/subscriptions","organizations_url":"https://api.github.com/users/wlu2016/orgs","repos_url":"https://api.github.com/users/wlu2016/repos","events_url":"https://api.github.com/users/wlu2016/events{/privacy}","received_events_url":"https://api.github.com/users/wlu2016/received_events","type":"User","site_admin":false},"repo":{"id":73889237,"name":"python-docs-samples","full_name":"wlu2016/python-docs-samples","owner":{"login":"wlu2016","id":15929996,"avatar_url":"https://avatars.githubusercontent.com/u/15929996?v=3","gravatar_id":"","url":"https://api.github.com/users/wlu2016","html_url":"https://github.com/wlu2016","followers_url":"https://api.github.com/users/wlu2016/followers","following_url":"https://api.github.com/users/wlu2016/following{/other_user}","gists_url":"https://api.github.com/users/wlu2016/gists{/gist_id}","starred_url":"https://api.github.com/users/wlu2016/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wlu2016/subscriptions","organizations_url":"https://api.github.com/users/wlu2016/orgs","repos_url":"https://api.github.com/users/wlu2016/repos","events_url":"https://api.github.com/users/wlu2016/events{/privacy}","received_events_url":"https://api.github.com/users/wlu2016/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wlu2016/python-docs-samples","description":"Code samples used on cloud.google.com","fork":true,"url":"https://api.github.com/repos/wlu2016/python-docs-samples","forks_url":"https://api.github.com/repos/wlu2016/python-docs-samples/forks","keys_url":"https://api.github.com/repos/wlu2016/python-docs-samples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wlu2016/python-docs-samples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wlu2016/python-docs-samples/teams","hooks_url":"https://api.github.com/repos/wlu2016/python-docs-samples/hooks","issue_events_url":"https://api.github.com/repos/wlu2016/python-docs-samples/issues/events{/number}","events_url":"https://api.github.com/repos/wlu2016/python-docs-samples/events","assignees_url":"https://api.github.com/repos/wlu2016/python-docs-samples/assignees{/user}","branches_url":"https://api.github.com/repos/wlu2016/python-docs-samples/branches{/branch}","tags_url":"https://api.github.com/repos/wlu2016/python-docs-samples/tags","blobs_url":"https://api.github.com/repos/wlu2016/python-docs-samples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wlu2016/python-docs-samples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wlu2016/python-docs-samples/git/refs{/sha}","trees_url":"https://api.github.com/repos/wlu2016/python-docs-samples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wlu2016/python-docs-samples/statuses/{sha}","languages_url":"https://api.github.com/repos/wlu2016/python-docs-samples/languages","stargazers_url":"https://api.github.com/repos/wlu2016/python-docs-samples/stargazers","contributors_url":"https://api.github.com/repos/wlu2016/python-docs-samples/contributors","subscribers_url":"https://api.github.com/repos/wlu2016/python-docs-samples/subscribers","subscription_url":"https://api.github.com/repos/wlu2016/python-docs-samples/subscription","commits_url":"https://api.github.com/repos/wlu2016/python-docs-samples/commits{/sha}","git_commits_url":"https://api.github.com/repos/wlu2016/python-docs-samples/git/commits{/sha}","comments_url":"https://api.github.com/repos/wlu2016/python-docs-samples/comments{/number}","issue_comment_url":"https://api.github.com/repos/wlu2016/python-docs-samples/issues/comments{/number}","contents_url":"https://api.github.com/repos/wlu2016/python-docs-samples/contents/{+path}","compare_url":"https://api.github.com/repos/wlu2016/python-docs-samples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wlu2016/python-docs-samples/merges","archive_url":"https://api.github.com/repos/wlu2016/python-docs-samples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wlu2016/python-docs-samples/downloads","issues_url":"https://api.github.com/repos/wlu2016/python-docs-samples/issues{/number}","pulls_url":"https://api.github.com/repos/wlu2016/python-docs-samples/pulls{/number}","milestones_url":"https://api.github.com/repos/wlu2016/python-docs-samples/milestones{/number}","notifications_url":"https://api.github.com/repos/wlu2016/python-docs-samples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wlu2016/python-docs-samples/labels{/name}","releases_url":"https://api.github.com/repos/wlu2016/python-docs-samples/releases{/id}","deployments_url":"https://api.github.com/repos/wlu2016/python-docs-samples/deployments","created_at":"2016-11-16T06:03:15Z","updated_at":"2016-11-16T06:03:17Z","pushed_at":"2016-11-16T06:32:47Z","git_url":"git://github.com/wlu2016/python-docs-samples.git","ssh_url":"git@github.com:wlu2016/python-docs-samples.git","clone_url":"https://github.com/wlu2016/python-docs-samples.git","svn_url":"https://github.com/wlu2016/python-docs-samples","homepage":"","size":3712,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"a2962f85acc827d34de902ea736a0d3329c67b95","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":35065876,"name":"python-docs-samples","full_name":"GoogleCloudPlatform/python-docs-samples","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/python-docs-samples","description":"Code samples used on cloud.google.com","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/deployments","created_at":"2015-05-04T23:26:13Z","updated_at":"2016-11-16T08:24:22Z","pushed_at":"2016-11-16T06:36:18Z","git_url":"git://github.com/GoogleCloudPlatform/python-docs-samples.git","ssh_url":"git@github.com:GoogleCloudPlatform/python-docs-samples.git","clone_url":"https://github.com/GoogleCloudPlatform/python-docs-samples.git","svn_url":"https://github.com/GoogleCloudPlatform/python-docs-samples","homepage":"","size":4712,"stargazers_count":399,"watchers_count":399,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":420,"mirror_url":null,"open_issues_count":22,"forks":420,"open_issues":22,"watchers":399,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/660"},"html":{"href":"https://github.com/GoogleCloudPlatform/python-docs-samples/pull/660"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/660"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/660/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/660/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/660/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/statuses/e47fbf6e00e9970c86aa361ce6fdf7cd15d75776"}}}}
{"actor":{"display_login":"jeffmendoza"}}