{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/comments/83704686","pull_request_review_id":4529611,"id":83704686,"diff_hunk":"@@ -0,0 +1,108 @@\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+\"\"\"Demonstration of the Firebase REST API in Python\"\"\"\n+\n+# [START rest_writing_data]\n+import base64\n+import json\n+import os\n+import re\n+import time\n+import urllib\n+\n+\n+from flask import request\n+import httplib2\n+from oauth2client.client import GoogleCredentials\n+\n+\n+_FIREBASE_SCOPES = [\n+    'https://www.googleapis.com/auth/firebase.database',\n+    'https://www.googleapis.com/auth/userinfo.email']\n+\n+\n+def _get_http(_memo={}):\n+    \"\"\"Provides an authed http object.\"\"\"\n+    if 'http' not in _memo:\n+        # Memorize the authorized http, to avoid fetching new access tokens","path":"appengine/standard/firebase/firetactoe/rest_api.py","position":39,"original_position":39,"commit_id":"b13ee15f51491ff3acdac22d32c4025af6e3a277","original_commit_id":"b13ee15f51491ff3acdac22d32c4025af6e3a277","user":{"login":"jerjou","id":913439,"avatar_url":"https://avatars.githubusercontent.com/u/913439?v=3","gravatar_id":"","url":"https://api.github.com/users/jerjou","html_url":"https://github.com/jerjou","followers_url":"https://api.github.com/users/jerjou/followers","following_url":"https://api.github.com/users/jerjou/following{/other_user}","gists_url":"https://api.github.com/users/jerjou/gists{/gist_id}","starred_url":"https://api.github.com/users/jerjou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerjou/subscriptions","organizations_url":"https://api.github.com/users/jerjou/orgs","repos_url":"https://api.github.com/users/jerjou/repos","events_url":"https://api.github.com/users/jerjou/events{/privacy}","received_events_url":"https://api.github.com/users/jerjou/received_events","type":"User","site_admin":false},"body":"[memoize](https://en.wikipedia.org/wiki/Memoization)","created_at":"2016-10-17T18:30:33Z","updated_at":"2016-10-17T18:30:33Z","html_url":"https://github.com/GoogleCloudPlatform/python-docs-samples/pull/587#discussion_r83704686","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/587","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/comments/83704686"},"html":{"href":"https://github.com/GoogleCloudPlatform/python-docs-samples/pull/587#discussion_r83704686"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/587"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/587","id":89672844,"html_url":"https://github.com/GoogleCloudPlatform/python-docs-samples/pull/587","diff_url":"https://github.com/GoogleCloudPlatform/python-docs-samples/pull/587.diff","patch_url":"https://github.com/GoogleCloudPlatform/python-docs-samples/pull/587.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/587","number":587,"state":"open","locked":false,"title":"fixed template bugs, added regions for docs writers, and moved creden…","user":{"login":"mogar1980","id":20994574,"avatar_url":"https://avatars.githubusercontent.com/u/20994574?v=3","gravatar_id":"","url":"https://api.github.com/users/mogar1980","html_url":"https://github.com/mogar1980","followers_url":"https://api.github.com/users/mogar1980/followers","following_url":"https://api.github.com/users/mogar1980/following{/other_user}","gists_url":"https://api.github.com/users/mogar1980/gists{/gist_id}","starred_url":"https://api.github.com/users/mogar1980/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mogar1980/subscriptions","organizations_url":"https://api.github.com/users/mogar1980/orgs","repos_url":"https://api.github.com/users/mogar1980/repos","events_url":"https://api.github.com/users/mogar1980/events{/privacy}","received_events_url":"https://api.github.com/users/mogar1980/received_events","type":"User","site_admin":false},"body":"…tials into json to make code more obvious to readers","created_at":"2016-10-17T18:04:38Z","updated_at":"2016-10-17T18:55:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bfd3aa05e09564cac6967522f86dfc472223a487","assignee":{"login":"jerjou","id":913439,"avatar_url":"https://avatars.githubusercontent.com/u/913439?v=3","gravatar_id":"","url":"https://api.github.com/users/jerjou","html_url":"https://github.com/jerjou","followers_url":"https://api.github.com/users/jerjou/followers","following_url":"https://api.github.com/users/jerjou/following{/other_user}","gists_url":"https://api.github.com/users/jerjou/gists{/gist_id}","starred_url":"https://api.github.com/users/jerjou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerjou/subscriptions","organizations_url":"https://api.github.com/users/jerjou/orgs","repos_url":"https://api.github.com/users/jerjou/repos","events_url":"https://api.github.com/users/jerjou/events{/privacy}","received_events_url":"https://api.github.com/users/jerjou/received_events","type":"User","site_admin":false},"assignees":[{"login":"jerjou","id":913439,"avatar_url":"https://avatars.githubusercontent.com/u/913439?v=3","gravatar_id":"","url":"https://api.github.com/users/jerjou","html_url":"https://github.com/jerjou","followers_url":"https://api.github.com/users/jerjou/followers","following_url":"https://api.github.com/users/jerjou/following{/other_user}","gists_url":"https://api.github.com/users/jerjou/gists{/gist_id}","starred_url":"https://api.github.com/users/jerjou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerjou/subscriptions","organizations_url":"https://api.github.com/users/jerjou/orgs","repos_url":"https://api.github.com/users/jerjou/repos","events_url":"https://api.github.com/users/jerjou/events{/privacy}","received_events_url":"https://api.github.com/users/jerjou/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/587/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/587/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/587/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/statuses/b13ee15f51491ff3acdac22d32c4025af6e3a277","head":{"label":"mogar1980:master","ref":"master","sha":"b13ee15f51491ff3acdac22d32c4025af6e3a277","user":{"login":"mogar1980","id":20994574,"avatar_url":"https://avatars.githubusercontent.com/u/20994574?v=3","gravatar_id":"","url":"https://api.github.com/users/mogar1980","html_url":"https://github.com/mogar1980","followers_url":"https://api.github.com/users/mogar1980/followers","following_url":"https://api.github.com/users/mogar1980/following{/other_user}","gists_url":"https://api.github.com/users/mogar1980/gists{/gist_id}","starred_url":"https://api.github.com/users/mogar1980/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mogar1980/subscriptions","organizations_url":"https://api.github.com/users/mogar1980/orgs","repos_url":"https://api.github.com/users/mogar1980/repos","events_url":"https://api.github.com/users/mogar1980/events{/privacy}","received_events_url":"https://api.github.com/users/mogar1980/received_events","type":"User","site_admin":false},"repo":{"id":70106428,"name":"python-docs-samples","full_name":"mogar1980/python-docs-samples","owner":{"login":"mogar1980","id":20994574,"avatar_url":"https://avatars.githubusercontent.com/u/20994574?v=3","gravatar_id":"","url":"https://api.github.com/users/mogar1980","html_url":"https://github.com/mogar1980","followers_url":"https://api.github.com/users/mogar1980/followers","following_url":"https://api.github.com/users/mogar1980/following{/other_user}","gists_url":"https://api.github.com/users/mogar1980/gists{/gist_id}","starred_url":"https://api.github.com/users/mogar1980/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mogar1980/subscriptions","organizations_url":"https://api.github.com/users/mogar1980/orgs","repos_url":"https://api.github.com/users/mogar1980/repos","events_url":"https://api.github.com/users/mogar1980/events{/privacy}","received_events_url":"https://api.github.com/users/mogar1980/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mogar1980/python-docs-samples","description":"Code samples used on cloud.google.com","fork":true,"url":"https://api.github.com/repos/mogar1980/python-docs-samples","forks_url":"https://api.github.com/repos/mogar1980/python-docs-samples/forks","keys_url":"https://api.github.com/repos/mogar1980/python-docs-samples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mogar1980/python-docs-samples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mogar1980/python-docs-samples/teams","hooks_url":"https://api.github.com/repos/mogar1980/python-docs-samples/hooks","issue_events_url":"https://api.github.com/repos/mogar1980/python-docs-samples/issues/events{/number}","events_url":"https://api.github.com/repos/mogar1980/python-docs-samples/events","assignees_url":"https://api.github.com/repos/mogar1980/python-docs-samples/assignees{/user}","branches_url":"https://api.github.com/repos/mogar1980/python-docs-samples/branches{/branch}","tags_url":"https://api.github.com/repos/mogar1980/python-docs-samples/tags","blobs_url":"https://api.github.com/repos/mogar1980/python-docs-samples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mogar1980/python-docs-samples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mogar1980/python-docs-samples/git/refs{/sha}","trees_url":"https://api.github.com/repos/mogar1980/python-docs-samples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mogar1980/python-docs-samples/statuses/{sha}","languages_url":"https://api.github.com/repos/mogar1980/python-docs-samples/languages","stargazers_url":"https://api.github.com/repos/mogar1980/python-docs-samples/stargazers","contributors_url":"https://api.github.com/repos/mogar1980/python-docs-samples/contributors","subscribers_url":"https://api.github.com/repos/mogar1980/python-docs-samples/subscribers","subscription_url":"https://api.github.com/repos/mogar1980/python-docs-samples/subscription","commits_url":"https://api.github.com/repos/mogar1980/python-docs-samples/commits{/sha}","git_commits_url":"https://api.github.com/repos/mogar1980/python-docs-samples/git/commits{/sha}","comments_url":"https://api.github.com/repos/mogar1980/python-docs-samples/comments{/number}","issue_comment_url":"https://api.github.com/repos/mogar1980/python-docs-samples/issues/comments{/number}","contents_url":"https://api.github.com/repos/mogar1980/python-docs-samples/contents/{+path}","compare_url":"https://api.github.com/repos/mogar1980/python-docs-samples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mogar1980/python-docs-samples/merges","archive_url":"https://api.github.com/repos/mogar1980/python-docs-samples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mogar1980/python-docs-samples/downloads","issues_url":"https://api.github.com/repos/mogar1980/python-docs-samples/issues{/number}","pulls_url":"https://api.github.com/repos/mogar1980/python-docs-samples/pulls{/number}","milestones_url":"https://api.github.com/repos/mogar1980/python-docs-samples/milestones{/number}","notifications_url":"https://api.github.com/repos/mogar1980/python-docs-samples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mogar1980/python-docs-samples/labels{/name}","releases_url":"https://api.github.com/repos/mogar1980/python-docs-samples/releases{/id}","deployments_url":"https://api.github.com/repos/mogar1980/python-docs-samples/deployments","created_at":"2016-10-05T23:05:34Z","updated_at":"2016-10-05T23:05:36Z","pushed_at":"2016-10-17T18:03:05Z","git_url":"git://github.com/mogar1980/python-docs-samples.git","ssh_url":"git@github.com:mogar1980/python-docs-samples.git","clone_url":"https://github.com/mogar1980/python-docs-samples.git","svn_url":"https://github.com/mogar1980/python-docs-samples","homepage":"","size":3461,"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":"efe65f1e89ad8f5c1305084b1526a62595f9e732","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-10-17T04:44:11Z","pushed_at":"2016-10-17T18:04:38Z","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":4285,"stargazers_count":349,"watchers_count":349,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":362,"mirror_url":null,"open_issues_count":21,"forks":362,"open_issues":21,"watchers":349,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/587"},"html":{"href":"https://github.com/GoogleCloudPlatform/python-docs-samples/pull/587"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/587"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/issues/587/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/pulls/587/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/587/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/python-docs-samples/statuses/b13ee15f51491ff3acdac22d32c4025af6e3a277"}}}}
{"actor":{"display_login":"jerjou"}}