{"action":"created","comment":{"url":"https://api.github.com/repos/elifesciences/profiles/pulls/comments/140511195","pull_request_review_id":64598680,"id":140511195,"diff_hunk":"@@ -0,0 +1,25 @@\n+import json\n+\n+import requests\n+from requests import Response\n+\n+API_VERSION = 'v2.0'\n+\n+\n+class OrcidClient(object):\n+    def __init__(self, api_uri: str) -> None:\n+        self.api_uri = api_uri\n+\n+    def get_record(self, orcid: str, access_token: str) -> dict:\n+        response = self._get_request('{}/record'.format(orcid), access_token)\n+\n+        return json.loads(response.text)\n+\n+    def _get_request(self, path, access_token) -> Response:\n+        uri = '{}/{}/{}'.format(self.api_uri, API_VERSION, path)\n+        headers = {'Accept': 'application/orcid+json', 'Authorization': 'Bearer ' + access_token}\n+\n+        response = requests.get(uri, headers=headers)\n+        response.raise_for_status()","path":"profiles/orcid.py","position":33,"original_position":23,"commit_id":"01f692e4cbefcad5d33b0b36ea19afda7c8a2c8f","original_commit_id":"2a68135f67513a5fdc28354e95e3447f75f3e63b","user":{"login":"thewilkybarkid","id":1784740,"avatar_url":"https://avatars0.githubusercontent.com/u/1784740?v=4","gravatar_id":"","url":"https://api.github.com/users/thewilkybarkid","html_url":"https://github.com/thewilkybarkid","followers_url":"https://api.github.com/users/thewilkybarkid/followers","following_url":"https://api.github.com/users/thewilkybarkid/following{/other_user}","gists_url":"https://api.github.com/users/thewilkybarkid/gists{/gist_id}","starred_url":"https://api.github.com/users/thewilkybarkid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thewilkybarkid/subscriptions","organizations_url":"https://api.github.com/users/thewilkybarkid/orgs","repos_url":"https://api.github.com/users/thewilkybarkid/repos","events_url":"https://api.github.com/users/thewilkybarkid/events{/privacy}","received_events_url":"https://api.github.com/users/thewilkybarkid/received_events","type":"User","site_admin":false},"body":"Added https://github.com/elifesciences/profiles/pull/26/commits/01f692e4cbefcad5d33b0b36ea19afda7c8a2c8f.","created_at":"2017-09-22T14:38:59Z","updated_at":"2017-09-22T14:38:59Z","html_url":"https://github.com/elifesciences/profiles/pull/26#discussion_r140511195","pull_request_url":"https://api.github.com/repos/elifesciences/profiles/pulls/26","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/elifesciences/profiles/pulls/comments/140511195"},"html":{"href":"https://github.com/elifesciences/profiles/pull/26#discussion_r140511195"},"pull_request":{"href":"https://api.github.com/repos/elifesciences/profiles/pulls/26"}},"in_reply_to_id":140254836},"pull_request":{"url":"https://api.github.com/repos/elifesciences/profiles/pulls/26","id":142316672,"html_url":"https://github.com/elifesciences/profiles/pull/26","diff_url":"https://github.com/elifesciences/profiles/pull/26.diff","patch_url":"https://github.com/elifesciences/profiles/pull/26.patch","issue_url":"https://api.github.com/repos/elifesciences/profiles/issues/26","number":26,"state":"open","locked":false,"title":"ELPP-2775 Fetch email addresses from ORCID","user":{"login":"thewilkybarkid","id":1784740,"avatar_url":"https://avatars0.githubusercontent.com/u/1784740?v=4","gravatar_id":"","url":"https://api.github.com/users/thewilkybarkid","html_url":"https://github.com/thewilkybarkid","followers_url":"https://api.github.com/users/thewilkybarkid/followers","following_url":"https://api.github.com/users/thewilkybarkid/following{/other_user}","gists_url":"https://api.github.com/users/thewilkybarkid/gists{/gist_id}","starred_url":"https://api.github.com/users/thewilkybarkid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thewilkybarkid/subscriptions","organizations_url":"https://api.github.com/users/thewilkybarkid/orgs","repos_url":"https://api.github.com/users/thewilkybarkid/repos","events_url":"https://api.github.com/users/thewilkybarkid/events{/privacy}","received_events_url":"https://api.github.com/users/thewilkybarkid/received_events","type":"User","site_admin":false},"body":"Still very much under development.","created_at":"2017-09-21T11:10:24Z","updated_at":"2017-09-22T14:38:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8cd400636bea10fc0895a9bd6044d19b143aa631","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/elifesciences/profiles/pulls/26/commits","review_comments_url":"https://api.github.com/repos/elifesciences/profiles/pulls/26/comments","review_comment_url":"https://api.github.com/repos/elifesciences/profiles/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elifesciences/profiles/issues/26/comments","statuses_url":"https://api.github.com/repos/elifesciences/profiles/statuses/01f692e4cbefcad5d33b0b36ea19afda7c8a2c8f","head":{"label":"elifesciences:profile-email-addresses","ref":"profile-email-addresses","sha":"01f692e4cbefcad5d33b0b36ea19afda7c8a2c8f","user":{"login":"elifesciences","id":1777367,"avatar_url":"https://avatars2.githubusercontent.com/u/1777367?v=4","gravatar_id":"","url":"https://api.github.com/users/elifesciences","html_url":"https://github.com/elifesciences","followers_url":"https://api.github.com/users/elifesciences/followers","following_url":"https://api.github.com/users/elifesciences/following{/other_user}","gists_url":"https://api.github.com/users/elifesciences/gists{/gist_id}","starred_url":"https://api.github.com/users/elifesciences/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elifesciences/subscriptions","organizations_url":"https://api.github.com/users/elifesciences/orgs","repos_url":"https://api.github.com/users/elifesciences/repos","events_url":"https://api.github.com/users/elifesciences/events{/privacy}","received_events_url":"https://api.github.com/users/elifesciences/received_events","type":"Organization","site_admin":false},"repo":{"id":94993646,"name":"profiles","full_name":"elifesciences/profiles","owner":{"login":"elifesciences","id":1777367,"avatar_url":"https://avatars2.githubusercontent.com/u/1777367?v=4","gravatar_id":"","url":"https://api.github.com/users/elifesciences","html_url":"https://github.com/elifesciences","followers_url":"https://api.github.com/users/elifesciences/followers","following_url":"https://api.github.com/users/elifesciences/following{/other_user}","gists_url":"https://api.github.com/users/elifesciences/gists{/gist_id}","starred_url":"https://api.github.com/users/elifesciences/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elifesciences/subscriptions","organizations_url":"https://api.github.com/users/elifesciences/orgs","repos_url":"https://api.github.com/users/elifesciences/repos","events_url":"https://api.github.com/users/elifesciences/events{/privacy}","received_events_url":"https://api.github.com/users/elifesciences/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elifesciences/profiles","description":null,"fork":false,"url":"https://api.github.com/repos/elifesciences/profiles","forks_url":"https://api.github.com/repos/elifesciences/profiles/forks","keys_url":"https://api.github.com/repos/elifesciences/profiles/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elifesciences/profiles/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elifesciences/profiles/teams","hooks_url":"https://api.github.com/repos/elifesciences/profiles/hooks","issue_events_url":"https://api.github.com/repos/elifesciences/profiles/issues/events{/number}","events_url":"https://api.github.com/repos/elifesciences/profiles/events","assignees_url":"https://api.github.com/repos/elifesciences/profiles/assignees{/user}","branches_url":"https://api.github.com/repos/elifesciences/profiles/branches{/branch}","tags_url":"https://api.github.com/repos/elifesciences/profiles/tags","blobs_url":"https://api.github.com/repos/elifesciences/profiles/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elifesciences/profiles/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elifesciences/profiles/git/refs{/sha}","trees_url":"https://api.github.com/repos/elifesciences/profiles/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elifesciences/profiles/statuses/{sha}","languages_url":"https://api.github.com/repos/elifesciences/profiles/languages","stargazers_url":"https://api.github.com/repos/elifesciences/profiles/stargazers","contributors_url":"https://api.github.com/repos/elifesciences/profiles/contributors","subscribers_url":"https://api.github.com/repos/elifesciences/profiles/subscribers","subscription_url":"https://api.github.com/repos/elifesciences/profiles/subscription","commits_url":"https://api.github.com/repos/elifesciences/profiles/commits{/sha}","git_commits_url":"https://api.github.com/repos/elifesciences/profiles/git/commits{/sha}","comments_url":"https://api.github.com/repos/elifesciences/profiles/comments{/number}","issue_comment_url":"https://api.github.com/repos/elifesciences/profiles/issues/comments{/number}","contents_url":"https://api.github.com/repos/elifesciences/profiles/contents/{+path}","compare_url":"https://api.github.com/repos/elifesciences/profiles/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elifesciences/profiles/merges","archive_url":"https://api.github.com/repos/elifesciences/profiles/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elifesciences/profiles/downloads","issues_url":"https://api.github.com/repos/elifesciences/profiles/issues{/number}","pulls_url":"https://api.github.com/repos/elifesciences/profiles/pulls{/number}","milestones_url":"https://api.github.com/repos/elifesciences/profiles/milestones{/number}","notifications_url":"https://api.github.com/repos/elifesciences/profiles/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elifesciences/profiles/labels{/name}","releases_url":"https://api.github.com/repos/elifesciences/profiles/releases{/id}","deployments_url":"https://api.github.com/repos/elifesciences/profiles/deployments","created_at":"2017-06-21T10:43:52Z","updated_at":"2017-08-30T10:33:48Z","pushed_at":"2017-09-22T14:38:44Z","git_url":"git://github.com/elifesciences/profiles.git","ssh_url":"git@github.com:elifesciences/profiles.git","clone_url":"https://github.com/elifesciences/profiles.git","svn_url":"https://github.com/elifesciences/profiles","homepage":null,"size":84,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"elifesciences:develop","ref":"develop","sha":"09380fca07a3aaea56db0f7676eb382df15faa6a","user":{"login":"elifesciences","id":1777367,"avatar_url":"https://avatars2.githubusercontent.com/u/1777367?v=4","gravatar_id":"","url":"https://api.github.com/users/elifesciences","html_url":"https://github.com/elifesciences","followers_url":"https://api.github.com/users/elifesciences/followers","following_url":"https://api.github.com/users/elifesciences/following{/other_user}","gists_url":"https://api.github.com/users/elifesciences/gists{/gist_id}","starred_url":"https://api.github.com/users/elifesciences/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elifesciences/subscriptions","organizations_url":"https://api.github.com/users/elifesciences/orgs","repos_url":"https://api.github.com/users/elifesciences/repos","events_url":"https://api.github.com/users/elifesciences/events{/privacy}","received_events_url":"https://api.github.com/users/elifesciences/received_events","type":"Organization","site_admin":false},"repo":{"id":94993646,"name":"profiles","full_name":"elifesciences/profiles","owner":{"login":"elifesciences","id":1777367,"avatar_url":"https://avatars2.githubusercontent.com/u/1777367?v=4","gravatar_id":"","url":"https://api.github.com/users/elifesciences","html_url":"https://github.com/elifesciences","followers_url":"https://api.github.com/users/elifesciences/followers","following_url":"https://api.github.com/users/elifesciences/following{/other_user}","gists_url":"https://api.github.com/users/elifesciences/gists{/gist_id}","starred_url":"https://api.github.com/users/elifesciences/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elifesciences/subscriptions","organizations_url":"https://api.github.com/users/elifesciences/orgs","repos_url":"https://api.github.com/users/elifesciences/repos","events_url":"https://api.github.com/users/elifesciences/events{/privacy}","received_events_url":"https://api.github.com/users/elifesciences/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elifesciences/profiles","description":null,"fork":false,"url":"https://api.github.com/repos/elifesciences/profiles","forks_url":"https://api.github.com/repos/elifesciences/profiles/forks","keys_url":"https://api.github.com/repos/elifesciences/profiles/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elifesciences/profiles/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elifesciences/profiles/teams","hooks_url":"https://api.github.com/repos/elifesciences/profiles/hooks","issue_events_url":"https://api.github.com/repos/elifesciences/profiles/issues/events{/number}","events_url":"https://api.github.com/repos/elifesciences/profiles/events","assignees_url":"https://api.github.com/repos/elifesciences/profiles/assignees{/user}","branches_url":"https://api.github.com/repos/elifesciences/profiles/branches{/branch}","tags_url":"https://api.github.com/repos/elifesciences/profiles/tags","blobs_url":"https://api.github.com/repos/elifesciences/profiles/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elifesciences/profiles/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elifesciences/profiles/git/refs{/sha}","trees_url":"https://api.github.com/repos/elifesciences/profiles/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elifesciences/profiles/statuses/{sha}","languages_url":"https://api.github.com/repos/elifesciences/profiles/languages","stargazers_url":"https://api.github.com/repos/elifesciences/profiles/stargazers","contributors_url":"https://api.github.com/repos/elifesciences/profiles/contributors","subscribers_url":"https://api.github.com/repos/elifesciences/profiles/subscribers","subscription_url":"https://api.github.com/repos/elifesciences/profiles/subscription","commits_url":"https://api.github.com/repos/elifesciences/profiles/commits{/sha}","git_commits_url":"https://api.github.com/repos/elifesciences/profiles/git/commits{/sha}","comments_url":"https://api.github.com/repos/elifesciences/profiles/comments{/number}","issue_comment_url":"https://api.github.com/repos/elifesciences/profiles/issues/comments{/number}","contents_url":"https://api.github.com/repos/elifesciences/profiles/contents/{+path}","compare_url":"https://api.github.com/repos/elifesciences/profiles/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elifesciences/profiles/merges","archive_url":"https://api.github.com/repos/elifesciences/profiles/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elifesciences/profiles/downloads","issues_url":"https://api.github.com/repos/elifesciences/profiles/issues{/number}","pulls_url":"https://api.github.com/repos/elifesciences/profiles/pulls{/number}","milestones_url":"https://api.github.com/repos/elifesciences/profiles/milestones{/number}","notifications_url":"https://api.github.com/repos/elifesciences/profiles/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elifesciences/profiles/labels{/name}","releases_url":"https://api.github.com/repos/elifesciences/profiles/releases{/id}","deployments_url":"https://api.github.com/repos/elifesciences/profiles/deployments","created_at":"2017-06-21T10:43:52Z","updated_at":"2017-08-30T10:33:48Z","pushed_at":"2017-09-22T14:38:44Z","git_url":"git://github.com/elifesciences/profiles.git","ssh_url":"git@github.com:elifesciences/profiles.git","clone_url":"https://github.com/elifesciences/profiles.git","svn_url":"https://github.com/elifesciences/profiles","homepage":null,"size":84,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/elifesciences/profiles/pulls/26"},"html":{"href":"https://github.com/elifesciences/profiles/pull/26"},"issue":{"href":"https://api.github.com/repos/elifesciences/profiles/issues/26"},"comments":{"href":"https://api.github.com/repos/elifesciences/profiles/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/elifesciences/profiles/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/elifesciences/profiles/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elifesciences/profiles/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/elifesciences/profiles/statuses/01f692e4cbefcad5d33b0b36ea19afda7c8a2c8f"}},"author_association":"OWNER"}}
{"actor":{"display_login":"thewilkybarkid"}}