{"action":"created","issue":{"url":"https://api.github.com/repos/MediaMath/t1-python/issues/90","repository_url":"https://api.github.com/repos/MediaMath/t1-python","labels_url":"https://api.github.com/repos/MediaMath/t1-python/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/MediaMath/t1-python/issues/90/comments","events_url":"https://api.github.com/repos/MediaMath/t1-python/issues/90/events","html_url":"https://github.com/MediaMath/t1-python/pull/90","id":168369007,"number":90,"title":"Set iterators in parsers","user":{"login":"pswaminathan","id":2104106,"avatar_url":"https://avatars.githubusercontent.com/u/2104106?v=3","gravatar_id":"","url":"https://api.github.com/users/pswaminathan","html_url":"https://github.com/pswaminathan","followers_url":"https://api.github.com/users/pswaminathan/followers","following_url":"https://api.github.com/users/pswaminathan/following{/other_user}","gists_url":"https://api.github.com/users/pswaminathan/gists{/gist_id}","starred_url":"https://api.github.com/users/pswaminathan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pswaminathan/subscriptions","organizations_url":"https://api.github.com/users/pswaminathan/orgs","repos_url":"https://api.github.com/users/pswaminathan/repos","events_url":"https://api.github.com/users/pswaminathan/events{/privacy}","received_events_url":"https://api.github.com/users/pswaminathan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-29T16:58:53Z","updated_at":"2016-08-02T07:05:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/MediaMath/t1-python/pulls/90","html_url":"https://github.com/MediaMath/t1-python/pull/90","diff_url":"https://github.com/MediaMath/t1-python/pull/90.diff","patch_url":"https://github.com/MediaMath/t1-python/pull/90.patch"},"body":"Nathan originally brought this up in #87 . In a lot of the service methods, we are expecting all entities to be an iterator, and using entity_count to see if something is a single entity or a collection. However, this doesn't account for instances where, for instance, you request a collection but it only has a single entity. We make it an iterator as we should, but the caller thinks it's an entity, so it chokes. \r\n\r\nHere, we set iterators in the parsers themselves, such that callers only need check if something is an iterator. We can then check that in the service methods to determine how to parse the object.\r\n\r\n@FodT @Cawb07 this is a fairly comprehensive change, so I could use a couple of CRs to make sure I haven't overlooked anything. It passes unit tests and acceptance tests, but could use some real-world and edge-case testing."},"comment":{"url":"https://api.github.com/repos/MediaMath/t1-python/issues/comments/236819356","html_url":"https://github.com/MediaMath/t1-python/pull/90#issuecomment-236819356","issue_url":"https://api.github.com/repos/MediaMath/t1-python/issues/90","id":236819356,"user":{"login":"FodT","id":5888989,"avatar_url":"https://avatars.githubusercontent.com/u/5888989?v=3","gravatar_id":"","url":"https://api.github.com/users/FodT","html_url":"https://github.com/FodT","followers_url":"https://api.github.com/users/FodT/followers","following_url":"https://api.github.com/users/FodT/following{/other_user}","gists_url":"https://api.github.com/users/FodT/gists{/gist_id}","starred_url":"https://api.github.com/users/FodT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FodT/subscriptions","organizations_url":"https://api.github.com/users/FodT/orgs","repos_url":"https://api.github.com/users/FodT/repos","events_url":"https://api.github.com/users/FodT/events{/privacy}","received_events_url":"https://api.github.com/users/FodT/received_events","type":"User","site_admin":false},"created_at":"2016-08-02T07:05:42Z","updated_at":"2016-08-02T07:05:42Z","body":"Looks good; much cleaner."}}
{"actor":{"display_login":"FodT"}}