{"action":"created","comment":{"url":"https://api.github.com/repos/praekelt/go-optouts-api/pulls/comments/32423153","id":32423153,"diff_hunk":"@@ -29,10 +32,16 @@ def get_opt_out(self, addresstype, address):\n             return opt_outs[0]\n         return None\n \n-    @app.handle_errors(OptOutNotFound)\n-    def opt_out_not_found(self, request, failure):\n-        return self.response(\n-            request, status_code=404, status_reason=\"Opt out not found.\")\n+# Save Opt Out Address\n+\n+    def save_opt_out(self, addresstype, address):\n+        opt_out = {\n+            \"id\": \"6666\",","path":"opt_out_http_api/api_methods.py","position":30,"original_position":30,"commit_id":"b95dece00865d693df541ab6b0b2a7b8d29d8e9c","original_commit_id":"b95dece00865d693df541ab6b0b2a7b8d29d8e9c","user":{"login":"hodgestar","id":165551,"avatar_url":"https://avatars.githubusercontent.com/u/165551?v=3","gravatar_id":"","url":"https://api.github.com/users/hodgestar","html_url":"https://github.com/hodgestar","followers_url":"https://api.github.com/users/hodgestar/followers","following_url":"https://api.github.com/users/hodgestar/following{/other_user}","gists_url":"https://api.github.com/users/hodgestar/gists{/gist_id}","starred_url":"https://api.github.com/users/hodgestar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hodgestar/subscriptions","organizations_url":"https://api.github.com/users/hodgestar/orgs","repos_url":"https://api.github.com/users/hodgestar/repos","events_url":"https://api.github.com/users/hodgestar/events{/privacy}","received_events_url":"https://api.github.com/users/hodgestar/received_events","type":"User","site_admin":false},"body":"Note that this will make testing more tricky (but such is life). :)","created_at":"2015-06-15T14:08:14Z","updated_at":"2015-06-15T14:08:14Z","html_url":"https://github.com/praekelt/go-optouts-api/pull/12#discussion_r32423153","pull_request_url":"https://api.github.com/repos/praekelt/go-optouts-api/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/praekelt/go-optouts-api/pulls/comments/32423153"},"html":{"href":"https://github.com/praekelt/go-optouts-api/pull/12#discussion_r32423153"},"pull_request":{"href":"https://api.github.com/repos/praekelt/go-optouts-api/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/praekelt/go-optouts-api/pulls/12","id":37686922,"html_url":"https://github.com/praekelt/go-optouts-api/pull/12","diff_url":"https://github.com/praekelt/go-optouts-api/pull/12.diff","patch_url":"https://github.com/praekelt/go-optouts-api/pull/12.patch","issue_url":"https://api.github.com/repos/praekelt/go-optouts-api/issues/12","number":12,"state":"open","locked":false,"title":"Opt Out API PUT Endpoint","user":{"login":"TrevorOctober","id":11028821,"avatar_url":"https://avatars.githubusercontent.com/u/11028821?v=3","gravatar_id":"","url":"https://api.github.com/users/TrevorOctober","html_url":"https://github.com/TrevorOctober","followers_url":"https://api.github.com/users/TrevorOctober/followers","following_url":"https://api.github.com/users/TrevorOctober/following{/other_user}","gists_url":"https://api.github.com/users/TrevorOctober/gists{/gist_id}","starred_url":"https://api.github.com/users/TrevorOctober/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrevorOctober/subscriptions","organizations_url":"https://api.github.com/users/TrevorOctober/orgs","repos_url":"https://api.github.com/users/TrevorOctober/repos","events_url":"https://api.github.com/users/TrevorOctober/events{/privacy}","received_events_url":"https://api.github.com/users/TrevorOctober/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-15T12:40:15Z","updated_at":"2015-06-15T14:08:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5003a68ce9a9b8c4ec25229151bd68258f67a142","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/praekelt/go-optouts-api/pulls/12/commits","review_comments_url":"https://api.github.com/repos/praekelt/go-optouts-api/pulls/12/comments","review_comment_url":"https://api.github.com/repos/praekelt/go-optouts-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/praekelt/go-optouts-api/issues/12/comments","statuses_url":"https://api.github.com/repos/praekelt/go-optouts-api/statuses/b95dece00865d693df541ab6b0b2a7b8d29d8e9c","head":{"label":"praekelt:feature/issue-12-Opt-out-api-put-endpoint","ref":"feature/issue-12-Opt-out-api-put-endpoint","sha":"b95dece00865d693df541ab6b0b2a7b8d29d8e9c","user":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"repo":{"id":35409273,"name":"go-optouts-api","full_name":"praekelt/go-optouts-api","owner":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/praekelt/go-optouts-api","description":"An API for managing Vumi Go opt outs","fork":false,"url":"https://api.github.com/repos/praekelt/go-optouts-api","forks_url":"https://api.github.com/repos/praekelt/go-optouts-api/forks","keys_url":"https://api.github.com/repos/praekelt/go-optouts-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praekelt/go-optouts-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praekelt/go-optouts-api/teams","hooks_url":"https://api.github.com/repos/praekelt/go-optouts-api/hooks","issue_events_url":"https://api.github.com/repos/praekelt/go-optouts-api/issues/events{/number}","events_url":"https://api.github.com/repos/praekelt/go-optouts-api/events","assignees_url":"https://api.github.com/repos/praekelt/go-optouts-api/assignees{/user}","branches_url":"https://api.github.com/repos/praekelt/go-optouts-api/branches{/branch}","tags_url":"https://api.github.com/repos/praekelt/go-optouts-api/tags","blobs_url":"https://api.github.com/repos/praekelt/go-optouts-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praekelt/go-optouts-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praekelt/go-optouts-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/praekelt/go-optouts-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praekelt/go-optouts-api/statuses/{sha}","languages_url":"https://api.github.com/repos/praekelt/go-optouts-api/languages","stargazers_url":"https://api.github.com/repos/praekelt/go-optouts-api/stargazers","contributors_url":"https://api.github.com/repos/praekelt/go-optouts-api/contributors","subscribers_url":"https://api.github.com/repos/praekelt/go-optouts-api/subscribers","subscription_url":"https://api.github.com/repos/praekelt/go-optouts-api/subscription","commits_url":"https://api.github.com/repos/praekelt/go-optouts-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/praekelt/go-optouts-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/praekelt/go-optouts-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/praekelt/go-optouts-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/praekelt/go-optouts-api/contents/{+path}","compare_url":"https://api.github.com/repos/praekelt/go-optouts-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praekelt/go-optouts-api/merges","archive_url":"https://api.github.com/repos/praekelt/go-optouts-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praekelt/go-optouts-api/downloads","issues_url":"https://api.github.com/repos/praekelt/go-optouts-api/issues{/number}","pulls_url":"https://api.github.com/repos/praekelt/go-optouts-api/pulls{/number}","milestones_url":"https://api.github.com/repos/praekelt/go-optouts-api/milestones{/number}","notifications_url":"https://api.github.com/repos/praekelt/go-optouts-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praekelt/go-optouts-api/labels{/name}","releases_url":"https://api.github.com/repos/praekelt/go-optouts-api/releases{/id}","created_at":"2015-05-11T07:38:08Z","updated_at":"2015-05-11T07:47:25Z","pushed_at":"2015-06-15T12:40:15Z","git_url":"git://github.com/praekelt/go-optouts-api.git","ssh_url":"git@github.com:praekelt/go-optouts-api.git","clone_url":"https://github.com/praekelt/go-optouts-api.git","svn_url":"https://github.com/praekelt/go-optouts-api","homepage":null,"size":320,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"develop"}},"base":{"label":"praekelt:develop","ref":"develop","sha":"0f77903b3c989f800c084c81621bc18a20941afd","user":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"repo":{"id":35409273,"name":"go-optouts-api","full_name":"praekelt/go-optouts-api","owner":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/praekelt/go-optouts-api","description":"An API for managing Vumi Go opt outs","fork":false,"url":"https://api.github.com/repos/praekelt/go-optouts-api","forks_url":"https://api.github.com/repos/praekelt/go-optouts-api/forks","keys_url":"https://api.github.com/repos/praekelt/go-optouts-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praekelt/go-optouts-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praekelt/go-optouts-api/teams","hooks_url":"https://api.github.com/repos/praekelt/go-optouts-api/hooks","issue_events_url":"https://api.github.com/repos/praekelt/go-optouts-api/issues/events{/number}","events_url":"https://api.github.com/repos/praekelt/go-optouts-api/events","assignees_url":"https://api.github.com/repos/praekelt/go-optouts-api/assignees{/user}","branches_url":"https://api.github.com/repos/praekelt/go-optouts-api/branches{/branch}","tags_url":"https://api.github.com/repos/praekelt/go-optouts-api/tags","blobs_url":"https://api.github.com/repos/praekelt/go-optouts-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praekelt/go-optouts-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praekelt/go-optouts-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/praekelt/go-optouts-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praekelt/go-optouts-api/statuses/{sha}","languages_url":"https://api.github.com/repos/praekelt/go-optouts-api/languages","stargazers_url":"https://api.github.com/repos/praekelt/go-optouts-api/stargazers","contributors_url":"https://api.github.com/repos/praekelt/go-optouts-api/contributors","subscribers_url":"https://api.github.com/repos/praekelt/go-optouts-api/subscribers","subscription_url":"https://api.github.com/repos/praekelt/go-optouts-api/subscription","commits_url":"https://api.github.com/repos/praekelt/go-optouts-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/praekelt/go-optouts-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/praekelt/go-optouts-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/praekelt/go-optouts-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/praekelt/go-optouts-api/contents/{+path}","compare_url":"https://api.github.com/repos/praekelt/go-optouts-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praekelt/go-optouts-api/merges","archive_url":"https://api.github.com/repos/praekelt/go-optouts-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praekelt/go-optouts-api/downloads","issues_url":"https://api.github.com/repos/praekelt/go-optouts-api/issues{/number}","pulls_url":"https://api.github.com/repos/praekelt/go-optouts-api/pulls{/number}","milestones_url":"https://api.github.com/repos/praekelt/go-optouts-api/milestones{/number}","notifications_url":"https://api.github.com/repos/praekelt/go-optouts-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praekelt/go-optouts-api/labels{/name}","releases_url":"https://api.github.com/repos/praekelt/go-optouts-api/releases{/id}","created_at":"2015-05-11T07:38:08Z","updated_at":"2015-05-11T07:47:25Z","pushed_at":"2015-06-15T12:40:15Z","git_url":"git://github.com/praekelt/go-optouts-api.git","ssh_url":"git@github.com:praekelt/go-optouts-api.git","clone_url":"https://github.com/praekelt/go-optouts-api.git","svn_url":"https://github.com/praekelt/go-optouts-api","homepage":null,"size":320,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/praekelt/go-optouts-api/pulls/12"},"html":{"href":"https://github.com/praekelt/go-optouts-api/pull/12"},"issue":{"href":"https://api.github.com/repos/praekelt/go-optouts-api/issues/12"},"comments":{"href":"https://api.github.com/repos/praekelt/go-optouts-api/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/praekelt/go-optouts-api/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/praekelt/go-optouts-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/praekelt/go-optouts-api/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/praekelt/go-optouts-api/statuses/b95dece00865d693df541ab6b0b2a7b8d29d8e9c"}}}}