{"action":"created","issue":{"url":"https://api.github.com/repos/cloudant/python-cloudant/issues/89","labels_url":"https://api.github.com/repos/cloudant/python-cloudant/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/cloudant/python-cloudant/issues/89/comments","events_url":"https://api.github.com/repos/cloudant/python-cloudant/issues/89/events","html_url":"https://github.com/cloudant/python-cloudant/pull/89","id":127975800,"number":89,"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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-01-21T17:24:42Z","updated_at":"2016-01-26T16:56:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cloudant/python-cloudant/pulls/89","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"},"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"},"comment":{"url":"https://api.github.com/repos/cloudant/python-cloudant/issues/comments/175114325","html_url":"https://github.com/cloudant/python-cloudant/pull/89#issuecomment-175114325","issue_url":"https://api.github.com/repos/cloudant/python-cloudant/issues/89","id":175114325,"user":{"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},"created_at":"2016-01-26T16:56:05Z","updated_at":"2016-01-26T16:56:05Z","body":"@JanekLehr, it looks like you've added the comments to the tests that Rich requested.  Can you squash your commits down to the original two and then let me know so that I can merge this PR into master."}}