{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/olympia/pulls/comments/45638117","id":45638117,"diff_hunk":"@@ -28,3 +31,12 @@ def post(self, request):\n         else:\n             login(request._request, user)\n             return Response({'email': identity['email']})\n+\n+\n+class ProfileView(JWTProtectedView, generics.RetrieveAPIView):\n+    serializer_class = UserProfileSerializer\n+\n+    def retrieve(self, request, *args, **kw):\n+        instance = request.user\n+        serializer = self.get_serializer(instance)","path":"apps/accounts/views.py","position":27,"original_position":27,"commit_id":"bb54bc0bc08a5f351290d64f94fbef46831fca28","original_commit_id":"bb54bc0bc08a5f351290d64f94fbef46831fca28","user":{"login":"mstriemer","id":211578,"avatar_url":"https://avatars.githubusercontent.com/u/211578?v=3","gravatar_id":"","url":"https://api.github.com/users/mstriemer","html_url":"https://github.com/mstriemer","followers_url":"https://api.github.com/users/mstriemer/followers","following_url":"https://api.github.com/users/mstriemer/following{/other_user}","gists_url":"https://api.github.com/users/mstriemer/gists{/gist_id}","starred_url":"https://api.github.com/users/mstriemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstriemer/subscriptions","organizations_url":"https://api.github.com/users/mstriemer/orgs","repos_url":"https://api.github.com/users/mstriemer/repos","events_url":"https://api.github.com/users/mstriemer/events{/privacy}","received_events_url":"https://api.github.com/users/mstriemer/received_events","type":"User","site_admin":false},"body":"Inlining `request.user` looks like it would be fine here.","created_at":"2015-11-23T18:12:34Z","updated_at":"2015-11-23T18:12:34Z","html_url":"https://github.com/mozilla/olympia/pull/959#discussion_r45638117","pull_request_url":"https://api.github.com/repos/mozilla/olympia/pulls/959","_links":{"self":{"href":"https://api.github.com/repos/mozilla/olympia/pulls/comments/45638117"},"html":{"href":"https://github.com/mozilla/olympia/pull/959#discussion_r45638117"},"pull_request":{"href":"https://api.github.com/repos/mozilla/olympia/pulls/959"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/olympia/pulls/959","id":51431235,"html_url":"https://github.com/mozilla/olympia/pull/959","diff_url":"https://github.com/mozilla/olympia/pull/959.diff","patch_url":"https://github.com/mozilla/olympia/pull/959.patch","issue_url":"https://api.github.com/repos/mozilla/olympia/issues/959","number":959,"state":"open","locked":false,"title":"add in a profile api (fixes #950)","user":{"login":"andymckay","id":74699,"avatar_url":"https://avatars.githubusercontent.com/u/74699?v=3","gravatar_id":"","url":"https://api.github.com/users/andymckay","html_url":"https://github.com/andymckay","followers_url":"https://api.github.com/users/andymckay/followers","following_url":"https://api.github.com/users/andymckay/following{/other_user}","gists_url":"https://api.github.com/users/andymckay/gists{/gist_id}","starred_url":"https://api.github.com/users/andymckay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andymckay/subscriptions","organizations_url":"https://api.github.com/users/andymckay/orgs","repos_url":"https://api.github.com/users/andymckay/repos","events_url":"https://api.github.com/users/andymckay/events{/privacy}","received_events_url":"https://api.github.com/users/andymckay/received_events","type":"User","site_admin":false},"body":"* create a profile end point\r\n* refactor out the API auth base\r\n* fixes #950\r\n","created_at":"2015-11-21T02:40:06Z","updated_at":"2015-11-23T18:12:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce3706adb4af550c27b0f29f95a5c36f567aa14f","assignee":{"login":"mstriemer","id":211578,"avatar_url":"https://avatars.githubusercontent.com/u/211578?v=3","gravatar_id":"","url":"https://api.github.com/users/mstriemer","html_url":"https://github.com/mstriemer","followers_url":"https://api.github.com/users/mstriemer/followers","following_url":"https://api.github.com/users/mstriemer/following{/other_user}","gists_url":"https://api.github.com/users/mstriemer/gists{/gist_id}","starred_url":"https://api.github.com/users/mstriemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstriemer/subscriptions","organizations_url":"https://api.github.com/users/mstriemer/orgs","repos_url":"https://api.github.com/users/mstriemer/repos","events_url":"https://api.github.com/users/mstriemer/events{/privacy}","received_events_url":"https://api.github.com/users/mstriemer/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/olympia/pulls/959/commits","review_comments_url":"https://api.github.com/repos/mozilla/olympia/pulls/959/comments","review_comment_url":"https://api.github.com/repos/mozilla/olympia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/olympia/issues/959/comments","statuses_url":"https://api.github.com/repos/mozilla/olympia/statuses/bb54bc0bc08a5f351290d64f94fbef46831fca28","head":{"label":"andymckay:users","ref":"users","sha":"bb54bc0bc08a5f351290d64f94fbef46831fca28","user":{"login":"andymckay","id":74699,"avatar_url":"https://avatars.githubusercontent.com/u/74699?v=3","gravatar_id":"","url":"https://api.github.com/users/andymckay","html_url":"https://github.com/andymckay","followers_url":"https://api.github.com/users/andymckay/followers","following_url":"https://api.github.com/users/andymckay/following{/other_user}","gists_url":"https://api.github.com/users/andymckay/gists{/gist_id}","starred_url":"https://api.github.com/users/andymckay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andymckay/subscriptions","organizations_url":"https://api.github.com/users/andymckay/orgs","repos_url":"https://api.github.com/users/andymckay/repos","events_url":"https://api.github.com/users/andymckay/events{/privacy}","received_events_url":"https://api.github.com/users/andymckay/received_events","type":"User","site_admin":false},"repo":{"id":42287725,"name":"olympia","full_name":"andymckay/olympia","owner":{"login":"andymckay","id":74699,"avatar_url":"https://avatars.githubusercontent.com/u/74699?v=3","gravatar_id":"","url":"https://api.github.com/users/andymckay","html_url":"https://github.com/andymckay","followers_url":"https://api.github.com/users/andymckay/followers","following_url":"https://api.github.com/users/andymckay/following{/other_user}","gists_url":"https://api.github.com/users/andymckay/gists{/gist_id}","starred_url":"https://api.github.com/users/andymckay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andymckay/subscriptions","organizations_url":"https://api.github.com/users/andymckay/orgs","repos_url":"https://api.github.com/users/andymckay/repos","events_url":"https://api.github.com/users/andymckay/events{/privacy}","received_events_url":"https://api.github.com/users/andymckay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andymckay/olympia","description":"addons.mozilla.org, reloaded.","fork":true,"url":"https://api.github.com/repos/andymckay/olympia","forks_url":"https://api.github.com/repos/andymckay/olympia/forks","keys_url":"https://api.github.com/repos/andymckay/olympia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andymckay/olympia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andymckay/olympia/teams","hooks_url":"https://api.github.com/repos/andymckay/olympia/hooks","issue_events_url":"https://api.github.com/repos/andymckay/olympia/issues/events{/number}","events_url":"https://api.github.com/repos/andymckay/olympia/events","assignees_url":"https://api.github.com/repos/andymckay/olympia/assignees{/user}","branches_url":"https://api.github.com/repos/andymckay/olympia/branches{/branch}","tags_url":"https://api.github.com/repos/andymckay/olympia/tags","blobs_url":"https://api.github.com/repos/andymckay/olympia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andymckay/olympia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andymckay/olympia/git/refs{/sha}","trees_url":"https://api.github.com/repos/andymckay/olympia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andymckay/olympia/statuses/{sha}","languages_url":"https://api.github.com/repos/andymckay/olympia/languages","stargazers_url":"https://api.github.com/repos/andymckay/olympia/stargazers","contributors_url":"https://api.github.com/repos/andymckay/olympia/contributors","subscribers_url":"https://api.github.com/repos/andymckay/olympia/subscribers","subscription_url":"https://api.github.com/repos/andymckay/olympia/subscription","commits_url":"https://api.github.com/repos/andymckay/olympia/commits{/sha}","git_commits_url":"https://api.github.com/repos/andymckay/olympia/git/commits{/sha}","comments_url":"https://api.github.com/repos/andymckay/olympia/comments{/number}","issue_comment_url":"https://api.github.com/repos/andymckay/olympia/issues/comments{/number}","contents_url":"https://api.github.com/repos/andymckay/olympia/contents/{+path}","compare_url":"https://api.github.com/repos/andymckay/olympia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andymckay/olympia/merges","archive_url":"https://api.github.com/repos/andymckay/olympia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andymckay/olympia/downloads","issues_url":"https://api.github.com/repos/andymckay/olympia/issues{/number}","pulls_url":"https://api.github.com/repos/andymckay/olympia/pulls{/number}","milestones_url":"https://api.github.com/repos/andymckay/olympia/milestones{/number}","notifications_url":"https://api.github.com/repos/andymckay/olympia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andymckay/olympia/labels{/name}","releases_url":"https://api.github.com/repos/andymckay/olympia/releases{/id}","created_at":"2015-09-11T04:31:39Z","updated_at":"2015-09-11T04:31:46Z","pushed_at":"2015-11-21T06:31:07Z","git_url":"git://github.com/andymckay/olympia.git","ssh_url":"git@github.com:andymckay/olympia.git","clone_url":"https://github.com/andymckay/olympia.git","svn_url":"https://github.com/andymckay/olympia","homepage":"https://addons.mozilla.org/","size":441569,"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":"mozilla:master","ref":"master","sha":"84a3f55dabb8d42e20ca9c4750fe37a6e00d0b87","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":16416867,"name":"olympia","full_name":"mozilla/olympia","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/olympia","description":"addons.mozilla.org, reloaded.","fork":false,"url":"https://api.github.com/repos/mozilla/olympia","forks_url":"https://api.github.com/repos/mozilla/olympia/forks","keys_url":"https://api.github.com/repos/mozilla/olympia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/olympia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/olympia/teams","hooks_url":"https://api.github.com/repos/mozilla/olympia/hooks","issue_events_url":"https://api.github.com/repos/mozilla/olympia/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/olympia/events","assignees_url":"https://api.github.com/repos/mozilla/olympia/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/olympia/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/olympia/tags","blobs_url":"https://api.github.com/repos/mozilla/olympia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/olympia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/olympia/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/olympia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/olympia/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/olympia/languages","stargazers_url":"https://api.github.com/repos/mozilla/olympia/stargazers","contributors_url":"https://api.github.com/repos/mozilla/olympia/contributors","subscribers_url":"https://api.github.com/repos/mozilla/olympia/subscribers","subscription_url":"https://api.github.com/repos/mozilla/olympia/subscription","commits_url":"https://api.github.com/repos/mozilla/olympia/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/olympia/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/olympia/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/olympia/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/olympia/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/olympia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/olympia/merges","archive_url":"https://api.github.com/repos/mozilla/olympia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/olympia/downloads","issues_url":"https://api.github.com/repos/mozilla/olympia/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/olympia/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/olympia/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/olympia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/olympia/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/olympia/releases{/id}","created_at":"2014-01-31T18:44:15Z","updated_at":"2015-11-05T17:24:17Z","pushed_at":"2015-11-23T12:24:09Z","git_url":"git://github.com/mozilla/olympia.git","ssh_url":"git@github.com:mozilla/olympia.git","clone_url":"https://github.com/mozilla/olympia.git","svn_url":"https://github.com/mozilla/olympia","homepage":"https://addons.mozilla.org/","size":443434,"stargazers_count":60,"watchers_count":60,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":120,"mirror_url":null,"open_issues_count":45,"forks":120,"open_issues":45,"watchers":60,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/olympia/pulls/959"},"html":{"href":"https://github.com/mozilla/olympia/pull/959"},"issue":{"href":"https://api.github.com/repos/mozilla/olympia/issues/959"},"comments":{"href":"https://api.github.com/repos/mozilla/olympia/issues/959/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/olympia/pulls/959/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/olympia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/olympia/pulls/959/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/olympia/statuses/bb54bc0bc08a5f351290d64f94fbef46831fca28"}}}}