{"action":"created","comment":{"url":"https://api.github.com/repos/zulip/zulip/pulls/comments/93210024","pull_request_review_id":13731400,"id":93210024,"diff_hunk":"@@ -0,0 +1,55 @@\n+from __future__ import absolute_import\n+from django.utils.translation import ugettext as _\n+from zerver.lib.actions import check_send_message\n+from zerver.lib.response import json_success, json_error\n+from zerver.decorator import REQ, has_request_variables, api_key_only_webhook_view\n+\n+from zerver.models import Client, UserProfile\n+\n+from django.http import HttpRequest, HttpResponse\n+from typing import Dict, Any, Iterable, Optional\n+\n+BODY_TEMPLATE = (\"Food nearby {displayString} coming right up\\n\\n\"\n+                 \"{name1}\\n{formattedAddress1}\\n{text1}\\n\\n\"\n+                 \"{name2}\\n{formattedAddress2}\\n{text2}\\n\\n\"\n+                 \"{name3}\\n{formattedAddress3}\\n{text3}\")\n+\n+@api_key_only_webhook_view('FourSquare')\n+@has_request_variables\n+def api_foursquare_webhook(request, user_profile, client,\n+                           payload=REQ(argument_type='body'),\n+                           stream=REQ(default='test'),\n+                           topic=REQ(default='FourSquare')):\n+                                # type: (HttpRequest, UserProfile, Client, Dict[str, Iterable[Dict[str, Any]]]) -> HttpResponse\n+    # try to add the Foursquare results","path":"zerver/views/webhooks/foursquare.py","position":24,"original_position":24,"commit_id":"e8a0ecbb6715f9def8095adcc5ea206e409659c1","original_commit_id":"e8a0ecbb6715f9def8095adcc5ea206e409659c1","user":{"login":"TomaszKolek","id":5993758,"avatar_url":"https://avatars.githubusercontent.com/u/5993758?v=3","gravatar_id":"","url":"https://api.github.com/users/TomaszKolek","html_url":"https://github.com/TomaszKolek","followers_url":"https://api.github.com/users/TomaszKolek/followers","following_url":"https://api.github.com/users/TomaszKolek/following{/other_user}","gists_url":"https://api.github.com/users/TomaszKolek/gists{/gist_id}","starred_url":"https://api.github.com/users/TomaszKolek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomaszKolek/subscriptions","organizations_url":"https://api.github.com/users/TomaszKolek/orgs","repos_url":"https://api.github.com/users/TomaszKolek/repos","events_url":"https://api.github.com/users/TomaszKolek/events{/privacy}","received_events_url":"https://api.github.com/users/TomaszKolek/received_events","type":"User","site_admin":false},"body":"Commit does not say anything important","created_at":"2016-12-20T10:32:20Z","updated_at":"2016-12-20T10:32:20Z","html_url":"https://github.com/zulip/zulip/pull/2804#discussion_r93210024","pull_request_url":"https://api.github.com/repos/zulip/zulip/pulls/2804","_links":{"self":{"href":"https://api.github.com/repos/zulip/zulip/pulls/comments/93210024"},"html":{"href":"https://github.com/zulip/zulip/pull/2804#discussion_r93210024"},"pull_request":{"href":"https://api.github.com/repos/zulip/zulip/pulls/2804"}}},"pull_request":{"url":"https://api.github.com/repos/zulip/zulip/pulls/2804","id":98718510,"html_url":"https://github.com/zulip/zulip/pull/2804","diff_url":"https://github.com/zulip/zulip/pull/2804.diff","patch_url":"https://github.com/zulip/zulip/pull/2804.patch","issue_url":"https://api.github.com/repos/zulip/zulip/issues/2804","number":2804,"state":"open","locked":false,"title":"integrations: Add webhook code, API endpoint, and tests for FourSquare.","user":{"login":"540KJ","id":23611943,"avatar_url":"https://avatars.githubusercontent.com/u/23611943?v=3","gravatar_id":"","url":"https://api.github.com/users/540KJ","html_url":"https://github.com/540KJ","followers_url":"https://api.github.com/users/540KJ/followers","following_url":"https://api.github.com/users/540KJ/following{/other_user}","gists_url":"https://api.github.com/users/540KJ/gists{/gist_id}","starred_url":"https://api.github.com/users/540KJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/540KJ/subscriptions","organizations_url":"https://api.github.com/users/540KJ/orgs","repos_url":"https://api.github.com/users/540KJ/repos","events_url":"https://api.github.com/users/540KJ/events{/privacy}","received_events_url":"https://api.github.com/users/540KJ/received_events","type":"User","site_admin":false},"body":"integrations: Add webhook code, API endpoint, and tests for FourSquare by 540KJ","created_at":"2016-12-20T10:03:58Z","updated_at":"2016-12-20T10:32:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc29f3e8772232dcdedcc90a53c9efeddf9b9ea4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zulip/zulip/pulls/2804/commits","review_comments_url":"https://api.github.com/repos/zulip/zulip/pulls/2804/comments","review_comment_url":"https://api.github.com/repos/zulip/zulip/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zulip/zulip/issues/2804/comments","statuses_url":"https://api.github.com/repos/zulip/zulip/statuses/e8a0ecbb6715f9def8095adcc5ea206e409659c1","head":{"label":"540KJ:foursquare-code","ref":"foursquare-code","sha":"e8a0ecbb6715f9def8095adcc5ea206e409659c1","user":{"login":"540KJ","id":23611943,"avatar_url":"https://avatars.githubusercontent.com/u/23611943?v=3","gravatar_id":"","url":"https://api.github.com/users/540KJ","html_url":"https://github.com/540KJ","followers_url":"https://api.github.com/users/540KJ/followers","following_url":"https://api.github.com/users/540KJ/following{/other_user}","gists_url":"https://api.github.com/users/540KJ/gists{/gist_id}","starred_url":"https://api.github.com/users/540KJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/540KJ/subscriptions","organizations_url":"https://api.github.com/users/540KJ/orgs","repos_url":"https://api.github.com/users/540KJ/repos","events_url":"https://api.github.com/users/540KJ/events{/privacy}","received_events_url":"https://api.github.com/users/540KJ/received_events","type":"User","site_admin":false},"repo":{"id":76409292,"name":"zulip","full_name":"540KJ/zulip","owner":{"login":"540KJ","id":23611943,"avatar_url":"https://avatars.githubusercontent.com/u/23611943?v=3","gravatar_id":"","url":"https://api.github.com/users/540KJ","html_url":"https://github.com/540KJ","followers_url":"https://api.github.com/users/540KJ/followers","following_url":"https://api.github.com/users/540KJ/following{/other_user}","gists_url":"https://api.github.com/users/540KJ/gists{/gist_id}","starred_url":"https://api.github.com/users/540KJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/540KJ/subscriptions","organizations_url":"https://api.github.com/users/540KJ/orgs","repos_url":"https://api.github.com/users/540KJ/repos","events_url":"https://api.github.com/users/540KJ/events{/privacy}","received_events_url":"https://api.github.com/users/540KJ/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/540KJ/zulip","description":"Zulip server - powerful open source group chat","fork":true,"url":"https://api.github.com/repos/540KJ/zulip","forks_url":"https://api.github.com/repos/540KJ/zulip/forks","keys_url":"https://api.github.com/repos/540KJ/zulip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/540KJ/zulip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/540KJ/zulip/teams","hooks_url":"https://api.github.com/repos/540KJ/zulip/hooks","issue_events_url":"https://api.github.com/repos/540KJ/zulip/issues/events{/number}","events_url":"https://api.github.com/repos/540KJ/zulip/events","assignees_url":"https://api.github.com/repos/540KJ/zulip/assignees{/user}","branches_url":"https://api.github.com/repos/540KJ/zulip/branches{/branch}","tags_url":"https://api.github.com/repos/540KJ/zulip/tags","blobs_url":"https://api.github.com/repos/540KJ/zulip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/540KJ/zulip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/540KJ/zulip/git/refs{/sha}","trees_url":"https://api.github.com/repos/540KJ/zulip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/540KJ/zulip/statuses/{sha}","languages_url":"https://api.github.com/repos/540KJ/zulip/languages","stargazers_url":"https://api.github.com/repos/540KJ/zulip/stargazers","contributors_url":"https://api.github.com/repos/540KJ/zulip/contributors","subscribers_url":"https://api.github.com/repos/540KJ/zulip/subscribers","subscription_url":"https://api.github.com/repos/540KJ/zulip/subscription","commits_url":"https://api.github.com/repos/540KJ/zulip/commits{/sha}","git_commits_url":"https://api.github.com/repos/540KJ/zulip/git/commits{/sha}","comments_url":"https://api.github.com/repos/540KJ/zulip/comments{/number}","issue_comment_url":"https://api.github.com/repos/540KJ/zulip/issues/comments{/number}","contents_url":"https://api.github.com/repos/540KJ/zulip/contents/{+path}","compare_url":"https://api.github.com/repos/540KJ/zulip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/540KJ/zulip/merges","archive_url":"https://api.github.com/repos/540KJ/zulip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/540KJ/zulip/downloads","issues_url":"https://api.github.com/repos/540KJ/zulip/issues{/number}","pulls_url":"https://api.github.com/repos/540KJ/zulip/pulls{/number}","milestones_url":"https://api.github.com/repos/540KJ/zulip/milestones{/number}","notifications_url":"https://api.github.com/repos/540KJ/zulip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/540KJ/zulip/labels{/name}","releases_url":"https://api.github.com/repos/540KJ/zulip/releases{/id}","deployments_url":"https://api.github.com/repos/540KJ/zulip/deployments","created_at":"2016-12-14T00:14:58Z","updated_at":"2016-12-14T00:15:07Z","pushed_at":"2016-12-20T10:13:32Z","git_url":"git://github.com/540KJ/zulip.git","ssh_url":"git@github.com:540KJ/zulip.git","clone_url":"https://github.com/540KJ/zulip.git","svn_url":"https://github.com/540KJ/zulip","homepage":"","size":126193,"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":"zulip:master","ref":"master","sha":"f83139e28cd18658bd47f05bd141742b0eb87bd3","user":{"login":"zulip","id":4921959,"avatar_url":"https://avatars.githubusercontent.com/u/4921959?v=3","gravatar_id":"","url":"https://api.github.com/users/zulip","html_url":"https://github.com/zulip","followers_url":"https://api.github.com/users/zulip/followers","following_url":"https://api.github.com/users/zulip/following{/other_user}","gists_url":"https://api.github.com/users/zulip/gists{/gist_id}","starred_url":"https://api.github.com/users/zulip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zulip/subscriptions","organizations_url":"https://api.github.com/users/zulip/orgs","repos_url":"https://api.github.com/users/zulip/repos","events_url":"https://api.github.com/users/zulip/events{/privacy}","received_events_url":"https://api.github.com/users/zulip/received_events","type":"Organization","site_admin":false},"repo":{"id":43160685,"name":"zulip","full_name":"zulip/zulip","owner":{"login":"zulip","id":4921959,"avatar_url":"https://avatars.githubusercontent.com/u/4921959?v=3","gravatar_id":"","url":"https://api.github.com/users/zulip","html_url":"https://github.com/zulip","followers_url":"https://api.github.com/users/zulip/followers","following_url":"https://api.github.com/users/zulip/following{/other_user}","gists_url":"https://api.github.com/users/zulip/gists{/gist_id}","starred_url":"https://api.github.com/users/zulip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zulip/subscriptions","organizations_url":"https://api.github.com/users/zulip/orgs","repos_url":"https://api.github.com/users/zulip/repos","events_url":"https://api.github.com/users/zulip/events{/privacy}","received_events_url":"https://api.github.com/users/zulip/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zulip/zulip","description":"Zulip server - powerful open source group chat","fork":false,"url":"https://api.github.com/repos/zulip/zulip","forks_url":"https://api.github.com/repos/zulip/zulip/forks","keys_url":"https://api.github.com/repos/zulip/zulip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zulip/zulip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zulip/zulip/teams","hooks_url":"https://api.github.com/repos/zulip/zulip/hooks","issue_events_url":"https://api.github.com/repos/zulip/zulip/issues/events{/number}","events_url":"https://api.github.com/repos/zulip/zulip/events","assignees_url":"https://api.github.com/repos/zulip/zulip/assignees{/user}","branches_url":"https://api.github.com/repos/zulip/zulip/branches{/branch}","tags_url":"https://api.github.com/repos/zulip/zulip/tags","blobs_url":"https://api.github.com/repos/zulip/zulip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zulip/zulip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zulip/zulip/git/refs{/sha}","trees_url":"https://api.github.com/repos/zulip/zulip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zulip/zulip/statuses/{sha}","languages_url":"https://api.github.com/repos/zulip/zulip/languages","stargazers_url":"https://api.github.com/repos/zulip/zulip/stargazers","contributors_url":"https://api.github.com/repos/zulip/zulip/contributors","subscribers_url":"https://api.github.com/repos/zulip/zulip/subscribers","subscription_url":"https://api.github.com/repos/zulip/zulip/subscription","commits_url":"https://api.github.com/repos/zulip/zulip/commits{/sha}","git_commits_url":"https://api.github.com/repos/zulip/zulip/git/commits{/sha}","comments_url":"https://api.github.com/repos/zulip/zulip/comments{/number}","issue_comment_url":"https://api.github.com/repos/zulip/zulip/issues/comments{/number}","contents_url":"https://api.github.com/repos/zulip/zulip/contents/{+path}","compare_url":"https://api.github.com/repos/zulip/zulip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zulip/zulip/merges","archive_url":"https://api.github.com/repos/zulip/zulip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zulip/zulip/downloads","issues_url":"https://api.github.com/repos/zulip/zulip/issues{/number}","pulls_url":"https://api.github.com/repos/zulip/zulip/pulls{/number}","milestones_url":"https://api.github.com/repos/zulip/zulip/milestones{/number}","notifications_url":"https://api.github.com/repos/zulip/zulip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zulip/zulip/labels{/name}","releases_url":"https://api.github.com/repos/zulip/zulip/releases{/id}","deployments_url":"https://api.github.com/repos/zulip/zulip/deployments","created_at":"2015-09-25T16:37:25Z","updated_at":"2016-12-19T18:49:41Z","pushed_at":"2016-12-20T10:24:40Z","git_url":"git://github.com/zulip/zulip.git","ssh_url":"git@github.com:zulip/zulip.git","clone_url":"https://github.com/zulip/zulip.git","svn_url":"https://github.com/zulip/zulip","homepage":"","size":125991,"stargazers_count":4341,"watchers_count":4341,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":937,"mirror_url":null,"open_issues_count":633,"forks":937,"open_issues":633,"watchers":4341,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zulip/zulip/pulls/2804"},"html":{"href":"https://github.com/zulip/zulip/pull/2804"},"issue":{"href":"https://api.github.com/repos/zulip/zulip/issues/2804"},"comments":{"href":"https://api.github.com/repos/zulip/zulip/issues/2804/comments"},"review_comments":{"href":"https://api.github.com/repos/zulip/zulip/pulls/2804/comments"},"review_comment":{"href":"https://api.github.com/repos/zulip/zulip/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zulip/zulip/pulls/2804/commits"},"statuses":{"href":"https://api.github.com/repos/zulip/zulip/statuses/e8a0ecbb6715f9def8095adcc5ea206e409659c1"}}}}
{"actor":{"display_login":"TomaszKolek"}}