{"action":"created","issue":{"url":"https://api.github.com/repos/ably/docs/issues/75","repository_url":"https://api.github.com/repos/ably/docs","labels_url":"https://api.github.com/repos/ably/docs/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/ably/docs/issues/75/comments","events_url":"https://api.github.com/repos/ably/docs/issues/75/events","html_url":"https://github.com/ably/docs/issues/75","id":122468450,"number":75,"title":"Token ClientOption should allow Token, TokenDetails or TokenRequest","user":{"login":"mattheworiordan","id":43789,"avatar_url":"https://avatars.githubusercontent.com/u/43789?v=3","gravatar_id":"","url":"https://api.github.com/users/mattheworiordan","html_url":"https://github.com/mattheworiordan","followers_url":"https://api.github.com/users/mattheworiordan/followers","following_url":"https://api.github.com/users/mattheworiordan/following{/other_user}","gists_url":"https://api.github.com/users/mattheworiordan/gists{/gist_id}","starred_url":"https://api.github.com/users/mattheworiordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattheworiordan/subscriptions","organizations_url":"https://api.github.com/users/mattheworiordan/orgs","repos_url":"https://api.github.com/users/mattheworiordan/repos","events_url":"https://api.github.com/users/mattheworiordan/events{/privacy}","received_events_url":"https://api.github.com/users/mattheworiordan/received_events","type":"User","site_admin":false},"labels":[{"id":361723096,"url":"https://api.github.com/repos/ably/docs/labels/client%20lib%20spec","name":"client lib spec","color":"fbca04","default":false},{"id":22504384,"url":"https://api.github.com/repos/ably/docs/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/ably/docs/milestones/1","html_url":"https://github.com/ably/docs/milestones/0.9%20spec","labels_url":"https://api.github.com/repos/ably/docs/milestones/1/labels","id":1530549,"number":1,"title":"0.9 spec","description":"","creator":{"login":"mattheworiordan","id":43789,"avatar_url":"https://avatars.githubusercontent.com/u/43789?v=3","gravatar_id":"","url":"https://api.github.com/users/mattheworiordan","html_url":"https://github.com/mattheworiordan","followers_url":"https://api.github.com/users/mattheworiordan/followers","following_url":"https://api.github.com/users/mattheworiordan/following{/other_user}","gists_url":"https://api.github.com/users/mattheworiordan/gists{/gist_id}","starred_url":"https://api.github.com/users/mattheworiordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattheworiordan/subscriptions","organizations_url":"https://api.github.com/users/mattheworiordan/orgs","repos_url":"https://api.github.com/users/mattheworiordan/repos","events_url":"https://api.github.com/users/mattheworiordan/events{/privacy}","received_events_url":"https://api.github.com/users/mattheworiordan/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":3,"state":"open","created_at":"2016-01-21T08:17:05Z","updated_at":"2016-11-23T12:46:05Z","due_on":"2016-12-31T23:00:00Z","closed_at":null},"comments":3,"created_at":"2015-12-16T10:02:47Z","updated_at":"2016-11-24T04:59:27Z","closed_at":null,"body":"Currently `ClientOption#token` only supports a `Token` or `TokenDetails` object.  It should also support a `TokenRequest` given `authUrl` and `authCallback` both support all three\n"},"comment":{"url":"https://api.github.com/repos/ably/docs/issues/comments/262690474","html_url":"https://github.com/ably/docs/issues/75#issuecomment-262690474","issue_url":"https://api.github.com/repos/ably/docs/issues/75","id":262690474,"user":{"login":"mattheworiordan","id":43789,"avatar_url":"https://avatars.githubusercontent.com/u/43789?v=3","gravatar_id":"","url":"https://api.github.com/users/mattheworiordan","html_url":"https://github.com/mattheworiordan","followers_url":"https://api.github.com/users/mattheworiordan/followers","following_url":"https://api.github.com/users/mattheworiordan/following{/other_user}","gists_url":"https://api.github.com/users/mattheworiordan/gists{/gist_id}","starred_url":"https://api.github.com/users/mattheworiordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattheworiordan/subscriptions","organizations_url":"https://api.github.com/users/mattheworiordan/orgs","repos_url":"https://api.github.com/users/mattheworiordan/repos","events_url":"https://api.github.com/users/mattheworiordan/events{/privacy}","received_events_url":"https://api.github.com/users/mattheworiordan/received_events","type":"User","site_admin":false},"created_at":"2016-11-24T04:59:27Z","updated_at":"2016-11-24T04:59:27Z","body":"> Means in weakly-typed languages we'd have to guess whether an object passed to the constructor is a tokenDetails or a clientOptions. \r\n\r\nNo, you only need to check if:\r\n\r\n* It's a string it's a token string \r\n* If it's an object, check if it has a `token` attribute, then it's a `TokenDetails`\r\n* Else if it's an object, it's a `TokenRequest` object.\r\n\r\nThat same logic exists for `authUrl` now.\r\n\r\nNot sure why you'd need to determine if its a `ClientOptions` or not?"}}
{"actor":{"display_login":"mattheworiordan"}}