{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/tweeter/pulls/comments/63876677","id":63876677,"diff_hunk":"@@ -0,0 +1,111 @@\n+import base64\n+import json\n+import urllib\n+import urllib2\n+\n+\n+# These are secret values from https://apps.twitter.com\n+CONSUMER_KEY = \"13XVPnFDyaywklg2YZaWFIDkx\"\n+CONSUMER_SECRET = \"I2pEsiGrn6rtfKfmywd5f8tQdd1d90u7TuS0FLvikTl3vlTlvR\"\n+\n+\n+# Cached access token\n+access_token = None\n+\n+\n+def new_access_token_request():\n+    '''Create a HTTP request to Twitter to get the access token required for making\n+    other requests to Twitter's APIs.\n+\n+    We must use the \"consumer key\" and \"consumer secret\" values assigned to our\n+    app to create a The implementation of this method is based on the","path":"shortcuts.py","position":21,"original_position":21,"commit_id":"a576755148e2c3295a246c7ae23c4694a61d7e9e","original_commit_id":"a576755148e2c3295a246c7ae23c4694a61d7e9e","user":{"login":"susiecoleman","id":6666113,"avatar_url":"https://avatars.githubusercontent.com/u/6666113?v=3","gravatar_id":"","url":"https://api.github.com/users/susiecoleman","html_url":"https://github.com/susiecoleman","followers_url":"https://api.github.com/users/susiecoleman/followers","following_url":"https://api.github.com/users/susiecoleman/following{/other_user}","gists_url":"https://api.github.com/users/susiecoleman/gists{/gist_id}","starred_url":"https://api.github.com/users/susiecoleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/susiecoleman/subscriptions","organizations_url":"https://api.github.com/users/susiecoleman/orgs","repos_url":"https://api.github.com/users/susiecoleman/repos","events_url":"https://api.github.com/users/susiecoleman/events{/privacy}","received_events_url":"https://api.github.com/users/susiecoleman/received_events","type":"User","site_admin":false},"body":"Is part of this sentence missing?","created_at":"2016-05-19T13:23:37Z","updated_at":"2016-05-19T13:23:37Z","html_url":"https://github.com/guardian/tweeter/pull/1#discussion_r63876677","pull_request_url":"https://api.github.com/repos/guardian/tweeter/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/guardian/tweeter/pulls/comments/63876677"},"html":{"href":"https://github.com/guardian/tweeter/pull/1#discussion_r63876677"},"pull_request":{"href":"https://api.github.com/repos/guardian/tweeter/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/tweeter/pulls/1","id":68860697,"html_url":"https://github.com/guardian/tweeter/pull/1","diff_url":"https://github.com/guardian/tweeter/pull/1.diff","patch_url":"https://github.com/guardian/tweeter/pull/1.patch","issue_url":"https://api.github.com/repos/guardian/tweeter/issues/1","number":1,"state":"open","locked":false,"title":"Hide all the gory implementation details","user":{"login":"maxspencer","id":951849,"avatar_url":"https://avatars.githubusercontent.com/u/951849?v=3","gravatar_id":"","url":"https://api.github.com/users/maxspencer","html_url":"https://github.com/maxspencer","followers_url":"https://api.github.com/users/maxspencer/followers","following_url":"https://api.github.com/users/maxspencer/following{/other_user}","gists_url":"https://api.github.com/users/maxspencer/gists{/gist_id}","starred_url":"https://api.github.com/users/maxspencer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxspencer/subscriptions","organizations_url":"https://api.github.com/users/maxspencer/orgs","repos_url":"https://api.github.com/users/maxspencer/repos","events_url":"https://api.github.com/users/maxspencer/events{/privacy}","received_events_url":"https://api.github.com/users/maxspencer/received_events","type":"User","site_admin":false},"body":"I've put all the complicated stuff into a helper module which I've provocatively called `shortcuts`, what do you think about that?\r\n\r\nThe main tweeter.py file is now only 42 lines long and most of the actual code is to do with making the output HTML, which seems okay.","created_at":"2016-05-04T13:21:46Z","updated_at":"2016-05-19T13:23:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9739c5d5701a4252ddb51b6dabc201e9fa06533","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/guardian/tweeter/pulls/1/commits","review_comments_url":"https://api.github.com/repos/guardian/tweeter/pulls/1/comments","review_comment_url":"https://api.github.com/repos/guardian/tweeter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/tweeter/issues/1/comments","statuses_url":"https://api.github.com/repos/guardian/tweeter/statuses/a576755148e2c3295a246c7ae23c4694a61d7e9e","head":{"label":"guardian:hide-details","ref":"hide-details","sha":"a576755148e2c3295a246c7ae23c4694a61d7e9e","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":56679946,"name":"tweeter","full_name":"guardian/tweeter","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/tweeter","description":"Placeholder description: @maxspencer created this with repo-genesis","fork":false,"url":"https://api.github.com/repos/guardian/tweeter","forks_url":"https://api.github.com/repos/guardian/tweeter/forks","keys_url":"https://api.github.com/repos/guardian/tweeter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/tweeter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/tweeter/teams","hooks_url":"https://api.github.com/repos/guardian/tweeter/hooks","issue_events_url":"https://api.github.com/repos/guardian/tweeter/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/tweeter/events","assignees_url":"https://api.github.com/repos/guardian/tweeter/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/tweeter/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/tweeter/tags","blobs_url":"https://api.github.com/repos/guardian/tweeter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/tweeter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/tweeter/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/tweeter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/tweeter/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/tweeter/languages","stargazers_url":"https://api.github.com/repos/guardian/tweeter/stargazers","contributors_url":"https://api.github.com/repos/guardian/tweeter/contributors","subscribers_url":"https://api.github.com/repos/guardian/tweeter/subscribers","subscription_url":"https://api.github.com/repos/guardian/tweeter/subscription","commits_url":"https://api.github.com/repos/guardian/tweeter/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/tweeter/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/tweeter/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/tweeter/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/tweeter/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/tweeter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/tweeter/merges","archive_url":"https://api.github.com/repos/guardian/tweeter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/tweeter/downloads","issues_url":"https://api.github.com/repos/guardian/tweeter/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/tweeter/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/tweeter/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/tweeter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/tweeter/labels{/name}","releases_url":"https://api.github.com/repos/guardian/tweeter/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/tweeter/deployments","created_at":"2016-04-20T11:04:49Z","updated_at":"2016-04-20T11:07:03Z","pushed_at":"2016-05-18T13:04:25Z","git_url":"git://github.com/guardian/tweeter.git","ssh_url":"git@github.com:guardian/tweeter.git","clone_url":"https://github.com/guardian/tweeter.git","svn_url":"https://github.com/guardian/tweeter","homepage":null,"size":8,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"8b94d10b5f20bd0484e904536804ddc0ad545664","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":56679946,"name":"tweeter","full_name":"guardian/tweeter","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/tweeter","description":"Placeholder description: @maxspencer created this with repo-genesis","fork":false,"url":"https://api.github.com/repos/guardian/tweeter","forks_url":"https://api.github.com/repos/guardian/tweeter/forks","keys_url":"https://api.github.com/repos/guardian/tweeter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/tweeter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/tweeter/teams","hooks_url":"https://api.github.com/repos/guardian/tweeter/hooks","issue_events_url":"https://api.github.com/repos/guardian/tweeter/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/tweeter/events","assignees_url":"https://api.github.com/repos/guardian/tweeter/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/tweeter/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/tweeter/tags","blobs_url":"https://api.github.com/repos/guardian/tweeter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/tweeter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/tweeter/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/tweeter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/tweeter/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/tweeter/languages","stargazers_url":"https://api.github.com/repos/guardian/tweeter/stargazers","contributors_url":"https://api.github.com/repos/guardian/tweeter/contributors","subscribers_url":"https://api.github.com/repos/guardian/tweeter/subscribers","subscription_url":"https://api.github.com/repos/guardian/tweeter/subscription","commits_url":"https://api.github.com/repos/guardian/tweeter/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/tweeter/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/tweeter/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/tweeter/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/tweeter/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/tweeter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/tweeter/merges","archive_url":"https://api.github.com/repos/guardian/tweeter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/tweeter/downloads","issues_url":"https://api.github.com/repos/guardian/tweeter/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/tweeter/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/tweeter/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/tweeter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/tweeter/labels{/name}","releases_url":"https://api.github.com/repos/guardian/tweeter/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/tweeter/deployments","created_at":"2016-04-20T11:04:49Z","updated_at":"2016-04-20T11:07:03Z","pushed_at":"2016-05-18T13:04:25Z","git_url":"git://github.com/guardian/tweeter.git","ssh_url":"git@github.com:guardian/tweeter.git","clone_url":"https://github.com/guardian/tweeter.git","svn_url":"https://github.com/guardian/tweeter","homepage":null,"size":8,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/tweeter/pulls/1"},"html":{"href":"https://github.com/guardian/tweeter/pull/1"},"issue":{"href":"https://api.github.com/repos/guardian/tweeter/issues/1"},"comments":{"href":"https://api.github.com/repos/guardian/tweeter/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/tweeter/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/tweeter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/tweeter/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/tweeter/statuses/a576755148e2c3295a246c7ae23c4694a61d7e9e"}}}}