{"action":"created","issue":{"url":"https://api.github.com/repos/exponentjs/exponent/issues/22","repository_url":"https://api.github.com/repos/exponentjs/exponent","labels_url":"https://api.github.com/repos/exponentjs/exponent/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/exponentjs/exponent/issues/22/comments","events_url":"https://api.github.com/repos/exponentjs/exponent/issues/22/events","html_url":"https://github.com/exponentjs/exponent/pull/22","id":192424257,"number":22,"title":"Richer Contacts API","user":{"login":"grabbou","id":2464966,"avatar_url":"https://avatars.githubusercontent.com/u/2464966?v=3","gravatar_id":"","url":"https://api.github.com/users/grabbou","html_url":"https://github.com/grabbou","followers_url":"https://api.github.com/users/grabbou/followers","following_url":"https://api.github.com/users/grabbou/following{/other_user}","gists_url":"https://api.github.com/users/grabbou/gists{/gist_id}","starred_url":"https://api.github.com/users/grabbou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grabbou/subscriptions","organizations_url":"https://api.github.com/users/grabbou/orgs","repos_url":"https://api.github.com/users/grabbou/repos","events_url":"https://api.github.com/users/grabbou/events{/privacy}","received_events_url":"https://api.github.com/users/grabbou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-29T22:46:35Z","updated_at":"2016-11-30T10:33:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/exponentjs/exponent/pulls/22","html_url":"https://github.com/exponentjs/exponent/pull/22","diff_url":"https://github.com/exponentjs/exponent/pull/22.diff","patch_url":"https://github.com/exponentjs/exponent/pull/22.patch"},"body":"Fixes #18. Implements richer contacts API.\r\n\r\nFew concerns:\r\n\r\n1) We could use iOS9 Contacts API if we are targeting iOS9+, that would allow us to at least prepare early. I've seen `todo` about that, any thoughts? Likely another PR, but wanted to get an idea what's the plan here.\r\n2) I am not really sure why we need to pass `fields` array to the native side - is this an optimisation to avoid looping? To be honest I cannot think of an use-case one would need contacts w/o phone number or an email. Removed it temporarily in my code but happy to bring back.\r\n\r\nPR also changes `email` to `emails` and `phoneNumber` to `phoneNumbers`. Breaking change as per @brentvatne suggestion. \r\n\r\nHere's the current preview of what's outputted: https://gist.github.com/grabbou/0a4554485cef69db95a17e87a5587ef2"},"comment":{"url":"https://api.github.com/repos/exponentjs/exponent/issues/comments/263839265","html_url":"https://github.com/exponentjs/exponent/pull/22#issuecomment-263839265","issue_url":"https://api.github.com/repos/exponentjs/exponent/issues/22","id":263839265,"user":{"login":"grabbou","id":2464966,"avatar_url":"https://avatars.githubusercontent.com/u/2464966?v=3","gravatar_id":"","url":"https://api.github.com/users/grabbou","html_url":"https://github.com/grabbou","followers_url":"https://api.github.com/users/grabbou/followers","following_url":"https://api.github.com/users/grabbou/following{/other_user}","gists_url":"https://api.github.com/users/grabbou/gists{/gist_id}","starred_url":"https://api.github.com/users/grabbou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grabbou/subscriptions","organizations_url":"https://api.github.com/users/grabbou/orgs","repos_url":"https://api.github.com/users/grabbou/repos","events_url":"https://api.github.com/users/grabbou/events{/privacy}","received_events_url":"https://api.github.com/users/grabbou/received_events","type":"User","site_admin":false},"created_at":"2016-11-30T10:33:29Z","updated_at":"2016-11-30T10:33:29Z","body":"What you mean? AFAIK there's no explicit default, at least on iOS. That's why Exponent used to return `phoneNumber` as a first item from an array (at least on iOS). I removed that and replaced in favour of an array - which seems more reasonable. Initially I kept the `phoneNumber` as is to provide non-breaking change, but Brent said it's irrelevant and easy to upgrade, so lets' do it"}}
{"actor":{"display_login":"grabbou"}}