{"action":"created","issue":{"url":"https://api.github.com/repos/ManifestWebDesign/twitter-connect-plugin/issues/38","repository_url":"https://api.github.com/repos/ManifestWebDesign/twitter-connect-plugin","labels_url":"https://api.github.com/repos/ManifestWebDesign/twitter-connect-plugin/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/ManifestWebDesign/twitter-connect-plugin/issues/38/comments","events_url":"https://api.github.com/repos/ManifestWebDesign/twitter-connect-plugin/issues/38/events","html_url":"https://github.com/ManifestWebDesign/twitter-connect-plugin/pull/38","id":187055182,"number":38,"title":"Change users/show api call to account/verify_credentials","user":{"login":"Tarekajaj","id":11189145,"avatar_url":"https://avatars.githubusercontent.com/u/11189145?v=3","gravatar_id":"","url":"https://api.github.com/users/Tarekajaj","html_url":"https://github.com/Tarekajaj","followers_url":"https://api.github.com/users/Tarekajaj/followers","following_url":"https://api.github.com/users/Tarekajaj/following{/other_user}","gists_url":"https://api.github.com/users/Tarekajaj/gists{/gist_id}","starred_url":"https://api.github.com/users/Tarekajaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tarekajaj/subscriptions","organizations_url":"https://api.github.com/users/Tarekajaj/orgs","repos_url":"https://api.github.com/users/Tarekajaj/repos","events_url":"https://api.github.com/users/Tarekajaj/events{/privacy}","received_events_url":"https://api.github.com/users/Tarekajaj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-03T13:09:34Z","updated_at":"2016-11-03T19:09:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ManifestWebDesign/twitter-connect-plugin/pulls/38","html_url":"https://github.com/ManifestWebDesign/twitter-connect-plugin/pull/38","diff_url":"https://github.com/ManifestWebDesign/twitter-connect-plugin/pull/38.diff","patch_url":"https://github.com/ManifestWebDesign/twitter-connect-plugin/pull/38.patch"},"body":"Change users/show api call to account/verify_credentials and pass include_email parameter as true to get current user details plus the email address.\r\nsame modification can be made to iOS code to allow the same."},"comment":{"url":"https://api.github.com/repos/ManifestWebDesign/twitter-connect-plugin/issues/comments/258244081","html_url":"https://github.com/ManifestWebDesign/twitter-connect-plugin/pull/38#issuecomment-258244081","issue_url":"https://api.github.com/repos/ManifestWebDesign/twitter-connect-plugin/issues/38","id":258244081,"user":{"login":"ferdil","id":1535763,"avatar_url":"https://avatars.githubusercontent.com/u/1535763?v=3","gravatar_id":"","url":"https://api.github.com/users/ferdil","html_url":"https://github.com/ferdil","followers_url":"https://api.github.com/users/ferdil/followers","following_url":"https://api.github.com/users/ferdil/following{/other_user}","gists_url":"https://api.github.com/users/ferdil/gists{/gist_id}","starred_url":"https://api.github.com/users/ferdil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferdil/subscriptions","organizations_url":"https://api.github.com/users/ferdil/orgs","repos_url":"https://api.github.com/users/ferdil/repos","events_url":"https://api.github.com/users/ferdil/events{/privacy}","received_events_url":"https://api.github.com/users/ferdil/received_events","type":"User","site_admin":false},"created_at":"2016-11-03T19:09:12Z","updated_at":"2016-11-03T19:09:12Z","body":"Hi, rather than changing the existing UserService, add a new service and interface, so something like:\r\n\r\n```\r\n\tclass AccountServiceApi extends TwitterApiClient {\r\n\t\tpublic AccountServiceApi(TwitterSession session) {\r\n\t\t\tsuper(session);\r\n\t\t}\r\n\r\n\t\tpublic AccountService getCustomService() {\r\n\t\t\treturn getService(AccountService.class);\r\n\t\t}\r\n\t}\r\n\r\ninterface AccountService {\r\n\t\t@GET(\"/1.1/account/verify_credentials.json\")\r\n\t\tvoid verifyCredentials (@Query(\"include_email\") boolean includeMail, Callback<Response> cb);\r\n  \t}\r\n```\r\n\r\nThen in the public `execute` method, add a call to a method which invokes the new service\r\n\r\n```\r\n \tprivate void verifyCredentials(final CallbackContext callbackContext) { \r\n```\r\n\r\nand in verifyCredentials you call the Twitter REST API\r\n\r\n```\r\n \t\t\tpublic void run() {\r\n  \t\t\t\tAccountServiceApi twitterApiClient = new AccountServiceApi(Twitter.getSessionManager().getActiveSession());\r\n  \t\t\t\tAccountService accountService = twitterApiClient.getCustomService();\r\nCallback<Response>() {\r\n+\t\t\t\tuserService.verifyCredentials(true, new Callback<Response>() {\r\n\r\n```\r\nI haven't tested the code above, but that's how I would code it."}}
{"actor":{"display_login":"ferdil"}}