{"action":"created","comment":{"url":"https://api.github.com/repos/hamimraavi/dyscover/pulls/comments/66700072","id":66700072,"diff_hunk":"@@ -0,0 +1,63 @@\n+import requests\n+\n+from django.conf import settings\n+\n+\n+def get_lat_lon(location, header):\n+    location_url = (\"https://developers.zomato.com/api/v2.1/locations?\"\n+                    \"query=%s\") % location\n+\n+    response = requests.get(location_url, headers=header)\n+    res = response.json()\n+\n+    coordinates = {}\n+\n+    try:\n+        coordinates[\"latitude\"] = (res[\"location_suggestions\"][0][\"latitude\"])\n+        coordinates[\"longitude\"] = (\n+            res[\"location_suggestions\"][0][\"longitude\"])\n+    except IndexError:\n+        coordinates[\"Error\"] = \"IndexError\"\n+        return coordinates\n+\n+    return coordinates\n+\n+\n+def search_restaurants(location, start=\"0\", queries=\"5\"):\n+    results = {}\n+\n+    header = {\n+        \"User-agent\": \"curl/7.43.0\",\n+        \"Accept\": \"application/json\",\n+        \"user_key\": settings.ZOMATO_KEY,\n+        }","path":"dyscover/dyscover.py","position":33,"original_position":33,"commit_id":"401ac0bdc0ffe2d8a48c3104c2d751cf2527bb3b","original_commit_id":"401ac0bdc0ffe2d8a48c3104c2d751cf2527bb3b","user":{"login":"dash1291","id":870428,"avatar_url":"https://avatars.githubusercontent.com/u/870428?v=3","gravatar_id":"","url":"https://api.github.com/users/dash1291","html_url":"https://github.com/dash1291","followers_url":"https://api.github.com/users/dash1291/followers","following_url":"https://api.github.com/users/dash1291/following{/other_user}","gists_url":"https://api.github.com/users/dash1291/gists{/gist_id}","starred_url":"https://api.github.com/users/dash1291/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dash1291/subscriptions","organizations_url":"https://api.github.com/users/dash1291/orgs","repos_url":"https://api.github.com/users/dash1291/repos","events_url":"https://api.github.com/users/dash1291/events{/privacy}","received_events_url":"https://api.github.com/users/dash1291/received_events","type":"User","site_admin":false},"body":"much better to indent the `}` at the level of header","created_at":"2016-06-11T03:29:57Z","updated_at":"2016-06-11T03:29:57Z","html_url":"https://github.com/hamimraavi/dyscover/pull/1#discussion_r66700072","pull_request_url":"https://api.github.com/repos/hamimraavi/dyscover/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/hamimraavi/dyscover/pulls/comments/66700072"},"html":{"href":"https://github.com/hamimraavi/dyscover/pull/1#discussion_r66700072"},"pull_request":{"href":"https://api.github.com/repos/hamimraavi/dyscover/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/hamimraavi/dyscover/pulls/1","id":73360911,"html_url":"https://github.com/hamimraavi/dyscover/pull/1","diff_url":"https://github.com/hamimraavi/dyscover/pull/1.diff","patch_url":"https://github.com/hamimraavi/dyscover/pull/1.patch","issue_url":"https://api.github.com/repos/hamimraavi/dyscover/issues/1","number":1,"state":"open","locked":false,"title":"First Commit","user":{"login":"hamimraavi","id":12843887,"avatar_url":"https://avatars.githubusercontent.com/u/12843887?v=3","gravatar_id":"","url":"https://api.github.com/users/hamimraavi","html_url":"https://github.com/hamimraavi","followers_url":"https://api.github.com/users/hamimraavi/followers","following_url":"https://api.github.com/users/hamimraavi/following{/other_user}","gists_url":"https://api.github.com/users/hamimraavi/gists{/gist_id}","starred_url":"https://api.github.com/users/hamimraavi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hamimraavi/subscriptions","organizations_url":"https://api.github.com/users/hamimraavi/orgs","repos_url":"https://api.github.com/users/hamimraavi/repos","events_url":"https://api.github.com/users/hamimraavi/events{/privacy}","received_events_url":"https://api.github.com/users/hamimraavi/received_events","type":"User","site_admin":false},"body":"Added python script at dyscover/dyscover.py","created_at":"2016-06-10T11:43:49Z","updated_at":"2016-06-11T03:29:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c722a6a8c74dab8a13eb22f44b949b35900c33cb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hamimraavi/dyscover/pulls/1/commits","review_comments_url":"https://api.github.com/repos/hamimraavi/dyscover/pulls/1/comments","review_comment_url":"https://api.github.com/repos/hamimraavi/dyscover/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hamimraavi/dyscover/issues/1/comments","statuses_url":"https://api.github.com/repos/hamimraavi/dyscover/statuses/401ac0bdc0ffe2d8a48c3104c2d751cf2527bb3b","head":{"label":"hamimraavi:testscript","ref":"testscript","sha":"401ac0bdc0ffe2d8a48c3104c2d751cf2527bb3b","user":{"login":"hamimraavi","id":12843887,"avatar_url":"https://avatars.githubusercontent.com/u/12843887?v=3","gravatar_id":"","url":"https://api.github.com/users/hamimraavi","html_url":"https://github.com/hamimraavi","followers_url":"https://api.github.com/users/hamimraavi/followers","following_url":"https://api.github.com/users/hamimraavi/following{/other_user}","gists_url":"https://api.github.com/users/hamimraavi/gists{/gist_id}","starred_url":"https://api.github.com/users/hamimraavi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hamimraavi/subscriptions","organizations_url":"https://api.github.com/users/hamimraavi/orgs","repos_url":"https://api.github.com/users/hamimraavi/repos","events_url":"https://api.github.com/users/hamimraavi/events{/privacy}","received_events_url":"https://api.github.com/users/hamimraavi/received_events","type":"User","site_admin":false},"repo":{"id":60835895,"name":"dyscover","full_name":"hamimraavi/dyscover","owner":{"login":"hamimraavi","id":12843887,"avatar_url":"https://avatars.githubusercontent.com/u/12843887?v=3","gravatar_id":"","url":"https://api.github.com/users/hamimraavi","html_url":"https://github.com/hamimraavi","followers_url":"https://api.github.com/users/hamimraavi/followers","following_url":"https://api.github.com/users/hamimraavi/following{/other_user}","gists_url":"https://api.github.com/users/hamimraavi/gists{/gist_id}","starred_url":"https://api.github.com/users/hamimraavi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hamimraavi/subscriptions","organizations_url":"https://api.github.com/users/hamimraavi/orgs","repos_url":"https://api.github.com/users/hamimraavi/repos","events_url":"https://api.github.com/users/hamimraavi/events{/privacy}","received_events_url":"https://api.github.com/users/hamimraavi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hamimraavi/dyscover","description":"Restaurant discovery api","fork":false,"url":"https://api.github.com/repos/hamimraavi/dyscover","forks_url":"https://api.github.com/repos/hamimraavi/dyscover/forks","keys_url":"https://api.github.com/repos/hamimraavi/dyscover/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hamimraavi/dyscover/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hamimraavi/dyscover/teams","hooks_url":"https://api.github.com/repos/hamimraavi/dyscover/hooks","issue_events_url":"https://api.github.com/repos/hamimraavi/dyscover/issues/events{/number}","events_url":"https://api.github.com/repos/hamimraavi/dyscover/events","assignees_url":"https://api.github.com/repos/hamimraavi/dyscover/assignees{/user}","branches_url":"https://api.github.com/repos/hamimraavi/dyscover/branches{/branch}","tags_url":"https://api.github.com/repos/hamimraavi/dyscover/tags","blobs_url":"https://api.github.com/repos/hamimraavi/dyscover/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hamimraavi/dyscover/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hamimraavi/dyscover/git/refs{/sha}","trees_url":"https://api.github.com/repos/hamimraavi/dyscover/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hamimraavi/dyscover/statuses/{sha}","languages_url":"https://api.github.com/repos/hamimraavi/dyscover/languages","stargazers_url":"https://api.github.com/repos/hamimraavi/dyscover/stargazers","contributors_url":"https://api.github.com/repos/hamimraavi/dyscover/contributors","subscribers_url":"https://api.github.com/repos/hamimraavi/dyscover/subscribers","subscription_url":"https://api.github.com/repos/hamimraavi/dyscover/subscription","commits_url":"https://api.github.com/repos/hamimraavi/dyscover/commits{/sha}","git_commits_url":"https://api.github.com/repos/hamimraavi/dyscover/git/commits{/sha}","comments_url":"https://api.github.com/repos/hamimraavi/dyscover/comments{/number}","issue_comment_url":"https://api.github.com/repos/hamimraavi/dyscover/issues/comments{/number}","contents_url":"https://api.github.com/repos/hamimraavi/dyscover/contents/{+path}","compare_url":"https://api.github.com/repos/hamimraavi/dyscover/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hamimraavi/dyscover/merges","archive_url":"https://api.github.com/repos/hamimraavi/dyscover/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hamimraavi/dyscover/downloads","issues_url":"https://api.github.com/repos/hamimraavi/dyscover/issues{/number}","pulls_url":"https://api.github.com/repos/hamimraavi/dyscover/pulls{/number}","milestones_url":"https://api.github.com/repos/hamimraavi/dyscover/milestones{/number}","notifications_url":"https://api.github.com/repos/hamimraavi/dyscover/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hamimraavi/dyscover/labels{/name}","releases_url":"https://api.github.com/repos/hamimraavi/dyscover/releases{/id}","deployments_url":"https://api.github.com/repos/hamimraavi/dyscover/deployments","created_at":"2016-06-10T09:05:17Z","updated_at":"2016-06-10T09:05:17Z","pushed_at":"2016-06-10T15:32:15Z","git_url":"git://github.com/hamimraavi/dyscover.git","ssh_url":"git@github.com:hamimraavi/dyscover.git","clone_url":"https://github.com/hamimraavi/dyscover.git","svn_url":"https://github.com/hamimraavi/dyscover","homepage":null,"size":8,"stargazers_count":0,"watchers_count":0,"language":null,"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":"hamimraavi:master","ref":"master","sha":"d1e15c750c7f3aeedad61b9d6de86ef1b28195bf","user":{"login":"hamimraavi","id":12843887,"avatar_url":"https://avatars.githubusercontent.com/u/12843887?v=3","gravatar_id":"","url":"https://api.github.com/users/hamimraavi","html_url":"https://github.com/hamimraavi","followers_url":"https://api.github.com/users/hamimraavi/followers","following_url":"https://api.github.com/users/hamimraavi/following{/other_user}","gists_url":"https://api.github.com/users/hamimraavi/gists{/gist_id}","starred_url":"https://api.github.com/users/hamimraavi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hamimraavi/subscriptions","organizations_url":"https://api.github.com/users/hamimraavi/orgs","repos_url":"https://api.github.com/users/hamimraavi/repos","events_url":"https://api.github.com/users/hamimraavi/events{/privacy}","received_events_url":"https://api.github.com/users/hamimraavi/received_events","type":"User","site_admin":false},"repo":{"id":60835895,"name":"dyscover","full_name":"hamimraavi/dyscover","owner":{"login":"hamimraavi","id":12843887,"avatar_url":"https://avatars.githubusercontent.com/u/12843887?v=3","gravatar_id":"","url":"https://api.github.com/users/hamimraavi","html_url":"https://github.com/hamimraavi","followers_url":"https://api.github.com/users/hamimraavi/followers","following_url":"https://api.github.com/users/hamimraavi/following{/other_user}","gists_url":"https://api.github.com/users/hamimraavi/gists{/gist_id}","starred_url":"https://api.github.com/users/hamimraavi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hamimraavi/subscriptions","organizations_url":"https://api.github.com/users/hamimraavi/orgs","repos_url":"https://api.github.com/users/hamimraavi/repos","events_url":"https://api.github.com/users/hamimraavi/events{/privacy}","received_events_url":"https://api.github.com/users/hamimraavi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hamimraavi/dyscover","description":"Restaurant discovery api","fork":false,"url":"https://api.github.com/repos/hamimraavi/dyscover","forks_url":"https://api.github.com/repos/hamimraavi/dyscover/forks","keys_url":"https://api.github.com/repos/hamimraavi/dyscover/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hamimraavi/dyscover/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hamimraavi/dyscover/teams","hooks_url":"https://api.github.com/repos/hamimraavi/dyscover/hooks","issue_events_url":"https://api.github.com/repos/hamimraavi/dyscover/issues/events{/number}","events_url":"https://api.github.com/repos/hamimraavi/dyscover/events","assignees_url":"https://api.github.com/repos/hamimraavi/dyscover/assignees{/user}","branches_url":"https://api.github.com/repos/hamimraavi/dyscover/branches{/branch}","tags_url":"https://api.github.com/repos/hamimraavi/dyscover/tags","blobs_url":"https://api.github.com/repos/hamimraavi/dyscover/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hamimraavi/dyscover/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hamimraavi/dyscover/git/refs{/sha}","trees_url":"https://api.github.com/repos/hamimraavi/dyscover/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hamimraavi/dyscover/statuses/{sha}","languages_url":"https://api.github.com/repos/hamimraavi/dyscover/languages","stargazers_url":"https://api.github.com/repos/hamimraavi/dyscover/stargazers","contributors_url":"https://api.github.com/repos/hamimraavi/dyscover/contributors","subscribers_url":"https://api.github.com/repos/hamimraavi/dyscover/subscribers","subscription_url":"https://api.github.com/repos/hamimraavi/dyscover/subscription","commits_url":"https://api.github.com/repos/hamimraavi/dyscover/commits{/sha}","git_commits_url":"https://api.github.com/repos/hamimraavi/dyscover/git/commits{/sha}","comments_url":"https://api.github.com/repos/hamimraavi/dyscover/comments{/number}","issue_comment_url":"https://api.github.com/repos/hamimraavi/dyscover/issues/comments{/number}","contents_url":"https://api.github.com/repos/hamimraavi/dyscover/contents/{+path}","compare_url":"https://api.github.com/repos/hamimraavi/dyscover/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hamimraavi/dyscover/merges","archive_url":"https://api.github.com/repos/hamimraavi/dyscover/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hamimraavi/dyscover/downloads","issues_url":"https://api.github.com/repos/hamimraavi/dyscover/issues{/number}","pulls_url":"https://api.github.com/repos/hamimraavi/dyscover/pulls{/number}","milestones_url":"https://api.github.com/repos/hamimraavi/dyscover/milestones{/number}","notifications_url":"https://api.github.com/repos/hamimraavi/dyscover/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hamimraavi/dyscover/labels{/name}","releases_url":"https://api.github.com/repos/hamimraavi/dyscover/releases{/id}","deployments_url":"https://api.github.com/repos/hamimraavi/dyscover/deployments","created_at":"2016-06-10T09:05:17Z","updated_at":"2016-06-10T09:05:17Z","pushed_at":"2016-06-10T15:32:15Z","git_url":"git://github.com/hamimraavi/dyscover.git","ssh_url":"git@github.com:hamimraavi/dyscover.git","clone_url":"https://github.com/hamimraavi/dyscover.git","svn_url":"https://github.com/hamimraavi/dyscover","homepage":null,"size":8,"stargazers_count":0,"watchers_count":0,"language":null,"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/hamimraavi/dyscover/pulls/1"},"html":{"href":"https://github.com/hamimraavi/dyscover/pull/1"},"issue":{"href":"https://api.github.com/repos/hamimraavi/dyscover/issues/1"},"comments":{"href":"https://api.github.com/repos/hamimraavi/dyscover/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/hamimraavi/dyscover/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/hamimraavi/dyscover/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hamimraavi/dyscover/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/hamimraavi/dyscover/statuses/401ac0bdc0ffe2d8a48c3104c2d751cf2527bb3b"}}}}
{"actor":{"display_login":"dash1291"}}