{"action":"created","issue":{"url":"https://api.github.com/repos/adonisjs/adonis-framework/issues/322","repository_url":"https://api.github.com/repos/adonisjs/adonis-framework","labels_url":"https://api.github.com/repos/adonisjs/adonis-framework/issues/322/labels{/name}","comments_url":"https://api.github.com/repos/adonisjs/adonis-framework/issues/322/comments","events_url":"https://api.github.com/repos/adonisjs/adonis-framework/issues/322/events","html_url":"https://github.com/adonisjs/adonis-framework/issues/322","id":183275550,"number":322,"title":"Issue with yielding in callbacks","user":{"login":"Perfect7M","id":5896181,"avatar_url":"https://avatars.githubusercontent.com/u/5896181?v=3","gravatar_id":"","url":"https://api.github.com/users/Perfect7M","html_url":"https://github.com/Perfect7M","followers_url":"https://api.github.com/users/Perfect7M/followers","following_url":"https://api.github.com/users/Perfect7M/following{/other_user}","gists_url":"https://api.github.com/users/Perfect7M/gists{/gist_id}","starred_url":"https://api.github.com/users/Perfect7M/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Perfect7M/subscriptions","organizations_url":"https://api.github.com/users/Perfect7M/orgs","repos_url":"https://api.github.com/users/Perfect7M/repos","events_url":"https://api.github.com/users/Perfect7M/events{/privacy}","received_events_url":"https://api.github.com/users/Perfect7M/received_events","type":"User","site_admin":false},"labels":[{"id":248226298,"url":"https://api.github.com/repos/adonisjs/adonis-framework/labels/invalid","name":"invalid","color":"e6e6e6","default":true}],"state":"closed","locked":false,"assignee":{"login":"thetutlage","id":1706381,"avatar_url":"https://avatars.githubusercontent.com/u/1706381?v=3","gravatar_id":"","url":"https://api.github.com/users/thetutlage","html_url":"https://github.com/thetutlage","followers_url":"https://api.github.com/users/thetutlage/followers","following_url":"https://api.github.com/users/thetutlage/following{/other_user}","gists_url":"https://api.github.com/users/thetutlage/gists{/gist_id}","starred_url":"https://api.github.com/users/thetutlage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thetutlage/subscriptions","organizations_url":"https://api.github.com/users/thetutlage/orgs","repos_url":"https://api.github.com/users/thetutlage/repos","events_url":"https://api.github.com/users/thetutlage/events{/privacy}","received_events_url":"https://api.github.com/users/thetutlage/received_events","type":"User","site_admin":false},"assignees":[{"login":"thetutlage","id":1706381,"avatar_url":"https://avatars.githubusercontent.com/u/1706381?v=3","gravatar_id":"","url":"https://api.github.com/users/thetutlage","html_url":"https://github.com/thetutlage","followers_url":"https://api.github.com/users/thetutlage/followers","following_url":"https://api.github.com/users/thetutlage/following{/other_user}","gists_url":"https://api.github.com/users/thetutlage/gists{/gist_id}","starred_url":"https://api.github.com/users/thetutlage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thetutlage/subscriptions","organizations_url":"https://api.github.com/users/thetutlage/orgs","repos_url":"https://api.github.com/users/thetutlage/repos","events_url":"https://api.github.com/users/thetutlage/events{/privacy}","received_events_url":"https://api.github.com/users/thetutlage/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2016-10-16T16:20:49Z","updated_at":"2016-11-09T11:29:26Z","closed_at":"2016-10-19T18:05:22Z","body":"Hello, I'm begginer in nodejs and especially generators app so i don't know how to do this on my own. In Google there is a lack of information:\n\n`twitch.getAuthenticatedUserChannel(body.access_token, collectInformation);`\n\n`function collectInformation(err, body) {\n                if(err) {\n                    console.dir(err);\n                } else {\n                    HomeController.prototype._user = {\n                        twitch_id: body._id,\n                        username: body.name,\n                        display_name: body.display_name,\n                        logo: body.logo\n                    };\n                }\n        }`\n\nI want to yield information about user to session but i can't do this in `collectInformation` because there is an error of can't use yield in function (i think so).\n\nSecond question is: How can bind other `HomeController` function to callback for ex. \n`* logged(request, response) {\n  [...]\n  twitch.getAuthenticatedUserChannel(body.access_token, collectInformation); //instead of collectInfromation() how can i bind finish() presented below?\n`\n`* finish() {\n        console.log(HomeController.prototype._user);\n    }`\n"},"comment":{"url":"https://api.github.com/repos/adonisjs/adonis-framework/issues/comments/259393384","html_url":"https://github.com/adonisjs/adonis-framework/issues/322#issuecomment-259393384","issue_url":"https://api.github.com/repos/adonisjs/adonis-framework/issues/322","id":259393384,"user":{"login":"navdeepsingh","id":2968787,"avatar_url":"https://avatars.githubusercontent.com/u/2968787?v=3","gravatar_id":"","url":"https://api.github.com/users/navdeepsingh","html_url":"https://github.com/navdeepsingh","followers_url":"https://api.github.com/users/navdeepsingh/followers","following_url":"https://api.github.com/users/navdeepsingh/following{/other_user}","gists_url":"https://api.github.com/users/navdeepsingh/gists{/gist_id}","starred_url":"https://api.github.com/users/navdeepsingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/navdeepsingh/subscriptions","organizations_url":"https://api.github.com/users/navdeepsingh/orgs","repos_url":"https://api.github.com/users/navdeepsingh/repos","events_url":"https://api.github.com/users/navdeepsingh/events{/privacy}","received_events_url":"https://api.github.com/users/navdeepsingh/received_events","type":"User","site_admin":false},"created_at":"2016-11-09T11:29:26Z","updated_at":"2016-11-09T11:29:26Z","body":"Hello @Atinux \r\nI am using this npm package https://www.npmjs.com/package/node-twitter-api\r\nfrom your above reference used es6-pomisify with following code\r\n```javascript\r\nconst getToken = promisify(twitter.getRequestToken.bind(twitter), {multiArgs: true})\r\n\r\ngetToken().then(function (result) {\r\n   console.log(result) // Is valid checked ok\r\n   yield request.session.put({'requestToken' : result[0], 'requestTokenSecret' : result[1]})\r\n});\r\n```\r\n\r\nAgain got error at ```yield``` ing request.session\r\n\r\nPlease guide next.\r\nThanks"}}
{"actor":{"display_login":"navdeepsingh"}}