{"action":"closed","number":89,"pull_request":{"url":"https://api.github.com/repos/cloudant/python-cloudant/pulls/89","id":56781474,"html_url":"https://github.com/cloudant/python-cloudant/pull/89","diff_url":"https://github.com/cloudant/python-cloudant/pull/89.diff","patch_url":"https://github.com/cloudant/python-cloudant/pull/89.patch","issue_url":"https://api.github.com/repos/cloudant/python-cloudant/issues/89","number":89,"state":"closed","locked":false,"title":"Remove the fields parameter from required Query parameters","user":{"login":"JanekLehr","id":1305710,"avatar_url":"https://avatars.githubusercontent.com/u/1305710?v=3","gravatar_id":"","url":"https://api.github.com/users/JanekLehr","html_url":"https://github.com/JanekLehr","followers_url":"https://api.github.com/users/JanekLehr/followers","following_url":"https://api.github.com/users/JanekLehr/following{/other_user}","gists_url":"https://api.github.com/users/JanekLehr/gists{/gist_id}","starred_url":"https://api.github.com/users/JanekLehr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanekLehr/subscriptions","organizations_url":"https://api.github.com/users/JanekLehr/orgs","repos_url":"https://api.github.com/users/JanekLehr/repos","events_url":"https://api.github.com/users/JanekLehr/events{/privacy}","received_events_url":"https://api.github.com/users/JanekLehr/received_events","type":"User","site_admin":false},"body":"_What:_\r\n\r\nRemove the enforcement of the `fields` as a required parameter for making a query.\r\n\r\n_Why:_\r\n\r\nCloudant supports not passing in the `fields` when making a query. If no fields are provided then all the fields of each document are returned. This PR makes sure that python-cloudant mimics that behavior.\r\n\r\n_How:_\r\n\r\n- In `CloudantDatabase.get_query_result()` the `fields` parameter is checked for existence before instantiating the `Query`.\r\n- In `Query.__call__` I removed the check for `fields` being `None` or empty.\r\n\r\n_Tests:_\r\n\r\n- The query callable tests that test for `fields` being empty or `None` were removed. \r\n- The tests were updated to treat `fields` as a `**kwargs` argument.\r\n- Test that calling `db.get_query_result` handles a nonexistent `fields` parameter.\r\n\r\n_Issues:_\r\n- #86 \r\n\r\nreviewer @alfinkel \r\nreviewer @ricellis","created_at":"2016-01-21T17:24:42Z","updated_at":"2016-01-26T17:28:33Z","closed_at":"2016-01-26T17:28:33Z","merged_at":"2016-01-26T17:28:33Z","merge_commit_sha":"1ff9c87749d7be008af101b662431bf5b6a07e0b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cloudant/python-cloudant/pulls/89/commits","review_comments_url":"https://api.github.com/repos/cloudant/python-cloudant/pulls/89/comments","review_comment_url":"https://api.github.com/repos/cloudant/python-cloudant/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cloudant/python-cloudant/issues/89/comments","statuses_url":"https://api.github.com/repos/cloudant/python-cloudant/statuses/bb98b76d8581523d8240b95580e7c12dc1269c44","head":{"label":"JanekLehr:86-remove-fields-from-required-query-args","ref":"86-remove-fields-from-required-query-args","sha":"bb98b76d8581523d8240b95580e7c12dc1269c44","user":{"login":"JanekLehr","id":1305710,"avatar_url":"https://avatars.githubusercontent.com/u/1305710?v=3","gravatar_id":"","url":"https://api.github.com/users/JanekLehr","html_url":"https://github.com/JanekLehr","followers_url":"https://api.github.com/users/JanekLehr/followers","following_url":"https://api.github.com/users/JanekLehr/following{/other_user}","gists_url":"https://api.github.com/users/JanekLehr/gists{/gist_id}","starred_url":"https://api.github.com/users/JanekLehr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanekLehr/subscriptions","organizations_url":"https://api.github.com/users/JanekLehr/orgs","repos_url":"https://api.github.com/users/JanekLehr/repos","events_url":"https://api.github.com/users/JanekLehr/events{/privacy}","received_events_url":"https://api.github.com/users/JanekLehr/received_events","type":"User","site_admin":false},"repo":{"id":50115310,"name":"python-cloudant","full_name":"JanekLehr/python-cloudant","owner":{"login":"JanekLehr","id":1305710,"avatar_url":"https://avatars.githubusercontent.com/u/1305710?v=3","gravatar_id":"","url":"https://api.github.com/users/JanekLehr","html_url":"https://github.com/JanekLehr","followers_url":"https://api.github.com/users/JanekLehr/followers","following_url":"https://api.github.com/users/JanekLehr/following{/other_user}","gists_url":"https://api.github.com/users/JanekLehr/gists{/gist_id}","starred_url":"https://api.github.com/users/JanekLehr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanekLehr/subscriptions","organizations_url":"https://api.github.com/users/JanekLehr/orgs","repos_url":"https://api.github.com/users/JanekLehr/repos","events_url":"https://api.github.com/users/JanekLehr/events{/privacy}","received_events_url":"https://api.github.com/users/JanekLehr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JanekLehr/python-cloudant","description":"A Python library for Cloudant and CouchDB","fork":true,"url":"https://api.github.com/repos/JanekLehr/python-cloudant","forks_url":"https://api.github.com/repos/JanekLehr/python-cloudant/forks","keys_url":"https://api.github.com/repos/JanekLehr/python-cloudant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JanekLehr/python-cloudant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JanekLehr/python-cloudant/teams","hooks_url":"https://api.github.com/repos/JanekLehr/python-cloudant/hooks","issue_events_url":"https://api.github.com/repos/JanekLehr/python-cloudant/issues/events{/number}","events_url":"https://api.github.com/repos/JanekLehr/python-cloudant/events","assignees_url":"https://api.github.com/repos/JanekLehr/python-cloudant/assignees{/user}","branches_url":"https://api.github.com/repos/JanekLehr/python-cloudant/branches{/branch}","tags_url":"https://api.github.com/repos/JanekLehr/python-cloudant/tags","blobs_url":"https://api.github.com/repos/JanekLehr/python-cloudant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JanekLehr/python-cloudant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JanekLehr/python-cloudant/git/refs{/sha}","trees_url":"https://api.github.com/repos/JanekLehr/python-cloudant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JanekLehr/python-cloudant/statuses/{sha}","languages_url":"https://api.github.com/repos/JanekLehr/python-cloudant/languages","stargazers_url":"https://api.github.com/repos/JanekLehr/python-cloudant/stargazers","contributors_url":"https://api.github.com/repos/JanekLehr/python-cloudant/contributors","subscribers_url":"https://api.github.com/repos/JanekLehr/python-cloudant/subscribers","subscription_url":"https://api.github.com/repos/JanekLehr/python-cloudant/subscription","commits_url":"https://api.github.com/repos/JanekLehr/python-cloudant/commits{/sha}","git_commits_url":"https://api.github.com/repos/JanekLehr/python-cloudant/git/commits{/sha}","comments_url":"https://api.github.com/repos/JanekLehr/python-cloudant/comments{/number}","issue_comment_url":"https://api.github.com/repos/JanekLehr/python-cloudant/issues/comments{/number}","contents_url":"https://api.github.com/repos/JanekLehr/python-cloudant/contents/{+path}","compare_url":"https://api.github.com/repos/JanekLehr/python-cloudant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JanekLehr/python-cloudant/merges","archive_url":"https://api.github.com/repos/JanekLehr/python-cloudant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JanekLehr/python-cloudant/downloads","issues_url":"https://api.github.com/repos/JanekLehr/python-cloudant/issues{/number}","pulls_url":"https://api.github.com/repos/JanekLehr/python-cloudant/pulls{/number}","milestones_url":"https://api.github.com/repos/JanekLehr/python-cloudant/milestones{/number}","notifications_url":"https://api.github.com/repos/JanekLehr/python-cloudant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JanekLehr/python-cloudant/labels{/name}","releases_url":"https://api.github.com/repos/JanekLehr/python-cloudant/releases{/id}","deployments_url":"https://api.github.com/repos/JanekLehr/python-cloudant/deployments","created_at":"2016-01-21T15:07:38Z","updated_at":"2016-01-21T15:07:39Z","pushed_at":"2016-01-26T17:13:25Z","git_url":"git://github.com/JanekLehr/python-cloudant.git","ssh_url":"git@github.com:JanekLehr/python-cloudant.git","clone_url":"https://github.com/JanekLehr/python-cloudant.git","svn_url":"https://github.com/JanekLehr/python-cloudant","homepage":null,"size":374,"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":"cloudant:master","ref":"master","sha":"d756af1240d8a7f592a97be40aae66176bd8370a","user":{"login":"cloudant","id":44642,"avatar_url":"https://avatars.githubusercontent.com/u/44642?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudant","html_url":"https://github.com/cloudant","followers_url":"https://api.github.com/users/cloudant/followers","following_url":"https://api.github.com/users/cloudant/following{/other_user}","gists_url":"https://api.github.com/users/cloudant/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudant/subscriptions","organizations_url":"https://api.github.com/users/cloudant/orgs","repos_url":"https://api.github.com/users/cloudant/repos","events_url":"https://api.github.com/users/cloudant/events{/privacy}","received_events_url":"https://api.github.com/users/cloudant/received_events","type":"Organization","site_admin":false},"repo":{"id":41557383,"name":"python-cloudant","full_name":"cloudant/python-cloudant","owner":{"login":"cloudant","id":44642,"avatar_url":"https://avatars.githubusercontent.com/u/44642?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudant","html_url":"https://github.com/cloudant","followers_url":"https://api.github.com/users/cloudant/followers","following_url":"https://api.github.com/users/cloudant/following{/other_user}","gists_url":"https://api.github.com/users/cloudant/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudant/subscriptions","organizations_url":"https://api.github.com/users/cloudant/orgs","repos_url":"https://api.github.com/users/cloudant/repos","events_url":"https://api.github.com/users/cloudant/events{/privacy}","received_events_url":"https://api.github.com/users/cloudant/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudant/python-cloudant","description":"A Python library for Cloudant and CouchDB","fork":false,"url":"https://api.github.com/repos/cloudant/python-cloudant","forks_url":"https://api.github.com/repos/cloudant/python-cloudant/forks","keys_url":"https://api.github.com/repos/cloudant/python-cloudant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudant/python-cloudant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudant/python-cloudant/teams","hooks_url":"https://api.github.com/repos/cloudant/python-cloudant/hooks","issue_events_url":"https://api.github.com/repos/cloudant/python-cloudant/issues/events{/number}","events_url":"https://api.github.com/repos/cloudant/python-cloudant/events","assignees_url":"https://api.github.com/repos/cloudant/python-cloudant/assignees{/user}","branches_url":"https://api.github.com/repos/cloudant/python-cloudant/branches{/branch}","tags_url":"https://api.github.com/repos/cloudant/python-cloudant/tags","blobs_url":"https://api.github.com/repos/cloudant/python-cloudant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudant/python-cloudant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudant/python-cloudant/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudant/python-cloudant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudant/python-cloudant/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudant/python-cloudant/languages","stargazers_url":"https://api.github.com/repos/cloudant/python-cloudant/stargazers","contributors_url":"https://api.github.com/repos/cloudant/python-cloudant/contributors","subscribers_url":"https://api.github.com/repos/cloudant/python-cloudant/subscribers","subscription_url":"https://api.github.com/repos/cloudant/python-cloudant/subscription","commits_url":"https://api.github.com/repos/cloudant/python-cloudant/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudant/python-cloudant/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudant/python-cloudant/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudant/python-cloudant/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudant/python-cloudant/contents/{+path}","compare_url":"https://api.github.com/repos/cloudant/python-cloudant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudant/python-cloudant/merges","archive_url":"https://api.github.com/repos/cloudant/python-cloudant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudant/python-cloudant/downloads","issues_url":"https://api.github.com/repos/cloudant/python-cloudant/issues{/number}","pulls_url":"https://api.github.com/repos/cloudant/python-cloudant/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudant/python-cloudant/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudant/python-cloudant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudant/python-cloudant/labels{/name}","releases_url":"https://api.github.com/repos/cloudant/python-cloudant/releases{/id}","deployments_url":"https://api.github.com/repos/cloudant/python-cloudant/deployments","created_at":"2015-08-28T16:22:49Z","updated_at":"2016-01-19T20:22:06Z","pushed_at":"2016-01-26T17:28:34Z","git_url":"git://github.com/cloudant/python-cloudant.git","ssh_url":"git@github.com:cloudant/python-cloudant.git","clone_url":"https://github.com/cloudant/python-cloudant.git","svn_url":"https://github.com/cloudant/python-cloudant","homepage":null,"size":392,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":29,"forks":3,"open_issues":29,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cloudant/python-cloudant/pulls/89"},"html":{"href":"https://github.com/cloudant/python-cloudant/pull/89"},"issue":{"href":"https://api.github.com/repos/cloudant/python-cloudant/issues/89"},"comments":{"href":"https://api.github.com/repos/cloudant/python-cloudant/issues/89/comments"},"review_comments":{"href":"https://api.github.com/repos/cloudant/python-cloudant/pulls/89/comments"},"review_comment":{"href":"https://api.github.com/repos/cloudant/python-cloudant/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cloudant/python-cloudant/pulls/89/commits"},"statuses":{"href":"https://api.github.com/repos/cloudant/python-cloudant/statuses/bb98b76d8581523d8240b95580e7c12dc1269c44"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"alfinkel","id":8793303,"avatar_url":"https://avatars.githubusercontent.com/u/8793303?v=3","gravatar_id":"","url":"https://api.github.com/users/alfinkel","html_url":"https://github.com/alfinkel","followers_url":"https://api.github.com/users/alfinkel/followers","following_url":"https://api.github.com/users/alfinkel/following{/other_user}","gists_url":"https://api.github.com/users/alfinkel/gists{/gist_id}","starred_url":"https://api.github.com/users/alfinkel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfinkel/subscriptions","organizations_url":"https://api.github.com/users/alfinkel/orgs","repos_url":"https://api.github.com/users/alfinkel/repos","events_url":"https://api.github.com/users/alfinkel/events{/privacy}","received_events_url":"https://api.github.com/users/alfinkel/received_events","type":"User","site_admin":false},"comments":11,"review_comments":4,"commits":2,"additions":58,"deletions":39,"changed_files":5}}