{"action":"created","comment":{"url":"https://api.github.com/repos/CartoDB/labs-middleware/pulls/comments/72639556","id":72639556,"diff_hunk":"@@ -162,10 +158,9 @@ def map_items():\n     named_map[\"auth\"][\"valid_tokens\"].append(new_token)\n \n     # Call CartoDB's Maps API to add the token to the named map\n-    requests.put(os.path.join(config.get('cartodb', 'maps_endpoint'), \"named\", map_name),\n-                 data=json.dumps(named_map),\n-                 params={\"api_key\": config.get('cartodb', 'api_key')},\n-                 headers={'content-type': 'application/json'})\n+    auth_client = APIKeyAuthClient(config.get('cartodb', 'api_key'), config.get('cartodb', 'username'))\n+    auth_client.send(os.path.join(config.get('cartodb', 'maps_endpoint'), \"named\", map_name), http_method=\"PUT\", http_headers={'content-type': 'application/json'}, body=json.dumps(named_map), params={\"api_key\": config.get('cartodb', 'api_key')})","path":"middleware.py","position":49,"original_position":49,"commit_id":"0828530501c23fcdd7cba92113781190c67fdced","original_commit_id":"0828530501c23fcdd7cba92113781190c67fdced","user":{"login":"danicarrion","id":498023,"avatar_url":"https://avatars.githubusercontent.com/u/498023?v=3","gravatar_id":"","url":"https://api.github.com/users/danicarrion","html_url":"https://github.com/danicarrion","followers_url":"https://api.github.com/users/danicarrion/followers","following_url":"https://api.github.com/users/danicarrion/following{/other_user}","gists_url":"https://api.github.com/users/danicarrion/gists{/gist_id}","starred_url":"https://api.github.com/users/danicarrion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danicarrion/subscriptions","organizations_url":"https://api.github.com/users/danicarrion/orgs","repos_url":"https://api.github.com/users/danicarrion/repos","events_url":"https://api.github.com/users/danicarrion/events{/privacy}","received_events_url":"https://api.github.com/users/danicarrion/received_events","type":"User","site_admin":false},"body":"same as above","created_at":"2016-07-28T15:02:23Z","updated_at":"2016-07-28T15:02:23Z","html_url":"https://github.com/CartoDB/labs-middleware/pull/1#discussion_r72639556","pull_request_url":"https://api.github.com/repos/CartoDB/labs-middleware/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/CartoDB/labs-middleware/pulls/comments/72639556"},"html":{"href":"https://github.com/CartoDB/labs-middleware/pull/1#discussion_r72639556"},"pull_request":{"href":"https://api.github.com/repos/CartoDB/labs-middleware/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/CartoDB/labs-middleware/pulls/1","id":79088908,"html_url":"https://github.com/CartoDB/labs-middleware/pull/1","diff_url":"https://github.com/CartoDB/labs-middleware/pull/1.diff","patch_url":"https://github.com/CartoDB/labs-middleware/pull/1.patch","issue_url":"https://api.github.com/repos/CartoDB/labs-middleware/issues/1","number":1,"state":"open","locked":false,"title":"employed the modified python sdk","user":{"login":"rohshar","id":19723718,"avatar_url":"https://avatars.githubusercontent.com/u/19723718?v=3","gravatar_id":"","url":"https://api.github.com/users/rohshar","html_url":"https://github.com/rohshar","followers_url":"https://api.github.com/users/rohshar/followers","following_url":"https://api.github.com/users/rohshar/following{/other_user}","gists_url":"https://api.github.com/users/rohshar/gists{/gist_id}","starred_url":"https://api.github.com/users/rohshar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rohshar/subscriptions","organizations_url":"https://api.github.com/users/rohshar/orgs","repos_url":"https://api.github.com/users/rohshar/repos","events_url":"https://api.github.com/users/rohshar/events{/privacy}","received_events_url":"https://api.github.com/users/rohshar/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-27T20:08:16Z","updated_at":"2016-07-28T15:02:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e7e1e051177adf8753b63a11497333a7520a46a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CartoDB/labs-middleware/pulls/1/commits","review_comments_url":"https://api.github.com/repos/CartoDB/labs-middleware/pulls/1/comments","review_comment_url":"https://api.github.com/repos/CartoDB/labs-middleware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CartoDB/labs-middleware/issues/1/comments","statuses_url":"https://api.github.com/repos/CartoDB/labs-middleware/statuses/0828530501c23fcdd7cba92113781190c67fdced","head":{"label":"CartoDB:r-edits","ref":"r-edits","sha":"0828530501c23fcdd7cba92113781190c67fdced","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":35101819,"name":"labs-middleware","full_name":"CartoDB/labs-middleware","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/labs-middleware","description":"","fork":false,"url":"https://api.github.com/repos/CartoDB/labs-middleware","forks_url":"https://api.github.com/repos/CartoDB/labs-middleware/forks","keys_url":"https://api.github.com/repos/CartoDB/labs-middleware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/labs-middleware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/labs-middleware/teams","hooks_url":"https://api.github.com/repos/CartoDB/labs-middleware/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/labs-middleware/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/labs-middleware/events","assignees_url":"https://api.github.com/repos/CartoDB/labs-middleware/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/labs-middleware/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/labs-middleware/tags","blobs_url":"https://api.github.com/repos/CartoDB/labs-middleware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/labs-middleware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/labs-middleware/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/labs-middleware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/labs-middleware/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/labs-middleware/languages","stargazers_url":"https://api.github.com/repos/CartoDB/labs-middleware/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/labs-middleware/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/labs-middleware/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/labs-middleware/subscription","commits_url":"https://api.github.com/repos/CartoDB/labs-middleware/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/labs-middleware/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/labs-middleware/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/labs-middleware/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/labs-middleware/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/labs-middleware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/labs-middleware/merges","archive_url":"https://api.github.com/repos/CartoDB/labs-middleware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/labs-middleware/downloads","issues_url":"https://api.github.com/repos/CartoDB/labs-middleware/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/labs-middleware/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/labs-middleware/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/labs-middleware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/labs-middleware/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/labs-middleware/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/labs-middleware/deployments","created_at":"2015-05-05T13:35:46Z","updated_at":"2015-11-26T12:46:57Z","pushed_at":"2016-07-27T20:08:17Z","git_url":"git://github.com/CartoDB/labs-middleware.git","ssh_url":"git@github.com:CartoDB/labs-middleware.git","clone_url":"https://github.com/CartoDB/labs-middleware.git","svn_url":"https://github.com/CartoDB/labs-middleware","homepage":null,"size":210,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"CartoDB:master","ref":"master","sha":"2ad49b7dc0c8f663ce06860f2d451113f640e383","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":35101819,"name":"labs-middleware","full_name":"CartoDB/labs-middleware","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/labs-middleware","description":"","fork":false,"url":"https://api.github.com/repos/CartoDB/labs-middleware","forks_url":"https://api.github.com/repos/CartoDB/labs-middleware/forks","keys_url":"https://api.github.com/repos/CartoDB/labs-middleware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/labs-middleware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/labs-middleware/teams","hooks_url":"https://api.github.com/repos/CartoDB/labs-middleware/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/labs-middleware/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/labs-middleware/events","assignees_url":"https://api.github.com/repos/CartoDB/labs-middleware/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/labs-middleware/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/labs-middleware/tags","blobs_url":"https://api.github.com/repos/CartoDB/labs-middleware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/labs-middleware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/labs-middleware/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/labs-middleware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/labs-middleware/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/labs-middleware/languages","stargazers_url":"https://api.github.com/repos/CartoDB/labs-middleware/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/labs-middleware/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/labs-middleware/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/labs-middleware/subscription","commits_url":"https://api.github.com/repos/CartoDB/labs-middleware/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/labs-middleware/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/labs-middleware/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/labs-middleware/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/labs-middleware/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/labs-middleware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/labs-middleware/merges","archive_url":"https://api.github.com/repos/CartoDB/labs-middleware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/labs-middleware/downloads","issues_url":"https://api.github.com/repos/CartoDB/labs-middleware/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/labs-middleware/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/labs-middleware/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/labs-middleware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/labs-middleware/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/labs-middleware/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/labs-middleware/deployments","created_at":"2015-05-05T13:35:46Z","updated_at":"2015-11-26T12:46:57Z","pushed_at":"2016-07-27T20:08:17Z","git_url":"git://github.com/CartoDB/labs-middleware.git","ssh_url":"git@github.com:CartoDB/labs-middleware.git","clone_url":"https://github.com/CartoDB/labs-middleware.git","svn_url":"https://github.com/CartoDB/labs-middleware","homepage":null,"size":210,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CartoDB/labs-middleware/pulls/1"},"html":{"href":"https://github.com/CartoDB/labs-middleware/pull/1"},"issue":{"href":"https://api.github.com/repos/CartoDB/labs-middleware/issues/1"},"comments":{"href":"https://api.github.com/repos/CartoDB/labs-middleware/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/CartoDB/labs-middleware/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/CartoDB/labs-middleware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CartoDB/labs-middleware/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/CartoDB/labs-middleware/statuses/0828530501c23fcdd7cba92113781190c67fdced"}}}}
{"actor":{"display_login":"danicarrion"}}