{"action":"created","comment":{"url":"https://api.github.com/repos/evansde77/metson/pulls/comments/38146466","id":38146466,"diff_hunk":"@@ -219,3 +219,117 @@ def __enter__(self):\n \n     def __exit__(self, *args):\n         self.save()\n+\n+    def get_attachment(\n+        self,\n+        attachment,\n+        headers=None,\n+        write_to=None,\n+        attachment_type=\"json\"\n+    ):\n+        \"\"\"\n+        _get_attachment_\n+\n+        Retrieve a document's attachment\n+\n+        :param str attachment: the attachment file name\n+        :param dict headers: Extra headers to be sent with request\n+        :param str write_to: File handler to write the attachment to,","path":"src/cloudant/document.py","position":19,"original_position":19,"commit_id":"fbca572160f147f5dbcc02d4b88db501bbe06b6f","original_commit_id":"fbca572160f147f5dbcc02d4b88db501bbe06b6f","user":{"login":"evansde77","id":342380,"avatar_url":"https://avatars.githubusercontent.com/u/342380?v=3","gravatar_id":"","url":"https://api.github.com/users/evansde77","html_url":"https://github.com/evansde77","followers_url":"https://api.github.com/users/evansde77/followers","following_url":"https://api.github.com/users/evansde77/following{/other_user}","gists_url":"https://api.github.com/users/evansde77/gists{/gist_id}","starred_url":"https://api.github.com/users/evansde77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evansde77/subscriptions","organizations_url":"https://api.github.com/users/evansde77/orgs","repos_url":"https://api.github.com/users/evansde77/repos","events_url":"https://api.github.com/users/evansde77/events{/privacy}","received_events_url":"https://api.github.com/users/evansde77/received_events","type":"User","site_admin":false},"body":"maybe specify that this should be opened for writing as well","created_at":"2015-08-27T21:09:56Z","updated_at":"2015-08-27T21:09:56Z","html_url":"https://github.com/evansde77/metson/pull/30#discussion_r38146466","pull_request_url":"https://api.github.com/repos/evansde77/metson/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/evansde77/metson/pulls/comments/38146466"},"html":{"href":"https://github.com/evansde77/metson/pull/30#discussion_r38146466"},"pull_request":{"href":"https://api.github.com/repos/evansde77/metson/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/evansde77/metson/pulls/30","id":43566841,"html_url":"https://github.com/evansde77/metson/pull/30","diff_url":"https://github.com/evansde77/metson/pull/30.diff","patch_url":"https://github.com/evansde77/metson/pull/30.patch","issue_url":"https://api.github.com/repos/evansde77/metson/issues/30","number":30,"state":"open","locked":false,"title":"Document Attachment functions","user":{"login":"skscharr","id":2460638,"avatar_url":"https://avatars.githubusercontent.com/u/2460638?v=3","gravatar_id":"","url":"https://api.github.com/users/skscharr","html_url":"https://github.com/skscharr","followers_url":"https://api.github.com/users/skscharr/followers","following_url":"https://api.github.com/users/skscharr/following{/other_user}","gists_url":"https://api.github.com/users/skscharr/gists{/gist_id}","starred_url":"https://api.github.com/users/skscharr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skscharr/subscriptions","organizations_url":"https://api.github.com/users/skscharr/orgs","repos_url":"https://api.github.com/users/skscharr/repos","events_url":"https://api.github.com/users/skscharr/events{/privacy}","received_events_url":"https://api.github.com/users/skscharr/received_events","type":"User","site_admin":false},"body":"This PR adds functions for put/get/delete attachments + unit tests\r\n\r\n@evansde77 ","created_at":"2015-08-27T21:05:44Z","updated_at":"2015-08-27T21:09:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a9fdcc4ecd5764ad06ba997f3411241f6c3c3bbb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/evansde77/metson/pulls/30/commits","review_comments_url":"https://api.github.com/repos/evansde77/metson/pulls/30/comments","review_comment_url":"https://api.github.com/repos/evansde77/metson/pulls/comments{/number}","comments_url":"https://api.github.com/repos/evansde77/metson/issues/30/comments","statuses_url":"https://api.github.com/repos/evansde77/metson/statuses/fbca572160f147f5dbcc02d4b88db501bbe06b6f","head":{"label":"evansde77:doc-attachment-funcs","ref":"doc-attachment-funcs","sha":"fbca572160f147f5dbcc02d4b88db501bbe06b6f","user":{"login":"evansde77","id":342380,"avatar_url":"https://avatars.githubusercontent.com/u/342380?v=3","gravatar_id":"","url":"https://api.github.com/users/evansde77","html_url":"https://github.com/evansde77","followers_url":"https://api.github.com/users/evansde77/followers","following_url":"https://api.github.com/users/evansde77/following{/other_user}","gists_url":"https://api.github.com/users/evansde77/gists{/gist_id}","starred_url":"https://api.github.com/users/evansde77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evansde77/subscriptions","organizations_url":"https://api.github.com/users/evansde77/orgs","repos_url":"https://api.github.com/users/evansde77/repos","events_url":"https://api.github.com/users/evansde77/events{/privacy}","received_events_url":"https://api.github.com/users/evansde77/received_events","type":"User","site_admin":false},"repo":{"id":21660814,"name":"metson","full_name":"evansde77/metson","owner":{"login":"evansde77","id":342380,"avatar_url":"https://avatars.githubusercontent.com/u/342380?v=3","gravatar_id":"","url":"https://api.github.com/users/evansde77","html_url":"https://github.com/evansde77","followers_url":"https://api.github.com/users/evansde77/followers","following_url":"https://api.github.com/users/evansde77/following{/other_user}","gists_url":"https://api.github.com/users/evansde77/gists{/gist_id}","starred_url":"https://api.github.com/users/evansde77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evansde77/subscriptions","organizations_url":"https://api.github.com/users/evansde77/orgs","repos_url":"https://api.github.com/users/evansde77/repos","events_url":"https://api.github.com/users/evansde77/events{/privacy}","received_events_url":"https://api.github.com/users/evansde77/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/evansde77/metson","description":"Prototype cloudant API. If it all goes wrong, you can just blame Metson.","fork":false,"url":"https://api.github.com/repos/evansde77/metson","forks_url":"https://api.github.com/repos/evansde77/metson/forks","keys_url":"https://api.github.com/repos/evansde77/metson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evansde77/metson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evansde77/metson/teams","hooks_url":"https://api.github.com/repos/evansde77/metson/hooks","issue_events_url":"https://api.github.com/repos/evansde77/metson/issues/events{/number}","events_url":"https://api.github.com/repos/evansde77/metson/events","assignees_url":"https://api.github.com/repos/evansde77/metson/assignees{/user}","branches_url":"https://api.github.com/repos/evansde77/metson/branches{/branch}","tags_url":"https://api.github.com/repos/evansde77/metson/tags","blobs_url":"https://api.github.com/repos/evansde77/metson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evansde77/metson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evansde77/metson/git/refs{/sha}","trees_url":"https://api.github.com/repos/evansde77/metson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evansde77/metson/statuses/{sha}","languages_url":"https://api.github.com/repos/evansde77/metson/languages","stargazers_url":"https://api.github.com/repos/evansde77/metson/stargazers","contributors_url":"https://api.github.com/repos/evansde77/metson/contributors","subscribers_url":"https://api.github.com/repos/evansde77/metson/subscribers","subscription_url":"https://api.github.com/repos/evansde77/metson/subscription","commits_url":"https://api.github.com/repos/evansde77/metson/commits{/sha}","git_commits_url":"https://api.github.com/repos/evansde77/metson/git/commits{/sha}","comments_url":"https://api.github.com/repos/evansde77/metson/comments{/number}","issue_comment_url":"https://api.github.com/repos/evansde77/metson/issues/comments{/number}","contents_url":"https://api.github.com/repos/evansde77/metson/contents/{+path}","compare_url":"https://api.github.com/repos/evansde77/metson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evansde77/metson/merges","archive_url":"https://api.github.com/repos/evansde77/metson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evansde77/metson/downloads","issues_url":"https://api.github.com/repos/evansde77/metson/issues{/number}","pulls_url":"https://api.github.com/repos/evansde77/metson/pulls{/number}","milestones_url":"https://api.github.com/repos/evansde77/metson/milestones{/number}","notifications_url":"https://api.github.com/repos/evansde77/metson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evansde77/metson/labels{/name}","releases_url":"https://api.github.com/repos/evansde77/metson/releases{/id}","created_at":"2014-07-09T16:53:14Z","updated_at":"2015-01-26T22:51:45Z","pushed_at":"2015-08-27T21:05:44Z","git_url":"git://github.com/evansde77/metson.git","ssh_url":"git@github.com:evansde77/metson.git","clone_url":"https://github.com/evansde77/metson.git","svn_url":"https://github.com/evansde77/metson","homepage":null,"size":806,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"develop"}},"base":{"label":"evansde77:develop","ref":"develop","sha":"1bceac3320221d093db9fd3d4f77c088578862fc","user":{"login":"evansde77","id":342380,"avatar_url":"https://avatars.githubusercontent.com/u/342380?v=3","gravatar_id":"","url":"https://api.github.com/users/evansde77","html_url":"https://github.com/evansde77","followers_url":"https://api.github.com/users/evansde77/followers","following_url":"https://api.github.com/users/evansde77/following{/other_user}","gists_url":"https://api.github.com/users/evansde77/gists{/gist_id}","starred_url":"https://api.github.com/users/evansde77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evansde77/subscriptions","organizations_url":"https://api.github.com/users/evansde77/orgs","repos_url":"https://api.github.com/users/evansde77/repos","events_url":"https://api.github.com/users/evansde77/events{/privacy}","received_events_url":"https://api.github.com/users/evansde77/received_events","type":"User","site_admin":false},"repo":{"id":21660814,"name":"metson","full_name":"evansde77/metson","owner":{"login":"evansde77","id":342380,"avatar_url":"https://avatars.githubusercontent.com/u/342380?v=3","gravatar_id":"","url":"https://api.github.com/users/evansde77","html_url":"https://github.com/evansde77","followers_url":"https://api.github.com/users/evansde77/followers","following_url":"https://api.github.com/users/evansde77/following{/other_user}","gists_url":"https://api.github.com/users/evansde77/gists{/gist_id}","starred_url":"https://api.github.com/users/evansde77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evansde77/subscriptions","organizations_url":"https://api.github.com/users/evansde77/orgs","repos_url":"https://api.github.com/users/evansde77/repos","events_url":"https://api.github.com/users/evansde77/events{/privacy}","received_events_url":"https://api.github.com/users/evansde77/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/evansde77/metson","description":"Prototype cloudant API. If it all goes wrong, you can just blame Metson.","fork":false,"url":"https://api.github.com/repos/evansde77/metson","forks_url":"https://api.github.com/repos/evansde77/metson/forks","keys_url":"https://api.github.com/repos/evansde77/metson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evansde77/metson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evansde77/metson/teams","hooks_url":"https://api.github.com/repos/evansde77/metson/hooks","issue_events_url":"https://api.github.com/repos/evansde77/metson/issues/events{/number}","events_url":"https://api.github.com/repos/evansde77/metson/events","assignees_url":"https://api.github.com/repos/evansde77/metson/assignees{/user}","branches_url":"https://api.github.com/repos/evansde77/metson/branches{/branch}","tags_url":"https://api.github.com/repos/evansde77/metson/tags","blobs_url":"https://api.github.com/repos/evansde77/metson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evansde77/metson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evansde77/metson/git/refs{/sha}","trees_url":"https://api.github.com/repos/evansde77/metson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evansde77/metson/statuses/{sha}","languages_url":"https://api.github.com/repos/evansde77/metson/languages","stargazers_url":"https://api.github.com/repos/evansde77/metson/stargazers","contributors_url":"https://api.github.com/repos/evansde77/metson/contributors","subscribers_url":"https://api.github.com/repos/evansde77/metson/subscribers","subscription_url":"https://api.github.com/repos/evansde77/metson/subscription","commits_url":"https://api.github.com/repos/evansde77/metson/commits{/sha}","git_commits_url":"https://api.github.com/repos/evansde77/metson/git/commits{/sha}","comments_url":"https://api.github.com/repos/evansde77/metson/comments{/number}","issue_comment_url":"https://api.github.com/repos/evansde77/metson/issues/comments{/number}","contents_url":"https://api.github.com/repos/evansde77/metson/contents/{+path}","compare_url":"https://api.github.com/repos/evansde77/metson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evansde77/metson/merges","archive_url":"https://api.github.com/repos/evansde77/metson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evansde77/metson/downloads","issues_url":"https://api.github.com/repos/evansde77/metson/issues{/number}","pulls_url":"https://api.github.com/repos/evansde77/metson/pulls{/number}","milestones_url":"https://api.github.com/repos/evansde77/metson/milestones{/number}","notifications_url":"https://api.github.com/repos/evansde77/metson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evansde77/metson/labels{/name}","releases_url":"https://api.github.com/repos/evansde77/metson/releases{/id}","created_at":"2014-07-09T16:53:14Z","updated_at":"2015-01-26T22:51:45Z","pushed_at":"2015-08-27T21:05:44Z","git_url":"git://github.com/evansde77/metson.git","ssh_url":"git@github.com:evansde77/metson.git","clone_url":"https://github.com/evansde77/metson.git","svn_url":"https://github.com/evansde77/metson","homepage":null,"size":806,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/evansde77/metson/pulls/30"},"html":{"href":"https://github.com/evansde77/metson/pull/30"},"issue":{"href":"https://api.github.com/repos/evansde77/metson/issues/30"},"comments":{"href":"https://api.github.com/repos/evansde77/metson/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/evansde77/metson/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/evansde77/metson/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/evansde77/metson/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/evansde77/metson/statuses/fbca572160f147f5dbcc02d4b88db501bbe06b6f"}}}}