{"action":"created","issue":{"url":"https://api.github.com/repos/futjs/fut-api/issues/2","repository_url":"https://api.github.com/repos/futjs/fut-api","labels_url":"https://api.github.com/repos/futjs/fut-api/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/futjs/fut-api/issues/2/comments","events_url":"https://api.github.com/repos/futjs/fut-api/issues/2/events","html_url":"https://github.com/futjs/fut-api/issues/2","id":157906743,"number":2,"title":"Error: Cannot find module 'moment'","user":{"login":"jpauloeti","id":17519835,"avatar_url":"https://avatars.githubusercontent.com/u/17519835?v=3","gravatar_id":"","url":"https://api.github.com/users/jpauloeti","html_url":"https://github.com/jpauloeti","followers_url":"https://api.github.com/users/jpauloeti/followers","following_url":"https://api.github.com/users/jpauloeti/following{/other_user}","gists_url":"https://api.github.com/users/jpauloeti/gists{/gist_id}","starred_url":"https://api.github.com/users/jpauloeti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpauloeti/subscriptions","organizations_url":"https://api.github.com/users/jpauloeti/orgs","repos_url":"https://api.github.com/users/jpauloeti/repos","events_url":"https://api.github.com/users/jpauloeti/events{/privacy}","received_events_url":"https://api.github.com/users/jpauloeti/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-01T13:29:16Z","updated_at":"2016-06-01T19:56:21Z","closed_at":null,"body":"In version 0.4.1 the require of moment module is missing. Also, always is returned the following error message: \"TypeError: Cannot read property 'email' of undefined\" when I try to call the .login() function."},"comment":{"url":"https://api.github.com/repos/futjs/fut-api/issues/comments/223106219","html_url":"https://github.com/futjs/fut-api/issues/2#issuecomment-223106219","issue_url":"https://api.github.com/repos/futjs/fut-api/issues/2","id":223106219,"user":{"login":"barczaG","id":1392454,"avatar_url":"https://avatars.githubusercontent.com/u/1392454?v=3","gravatar_id":"","url":"https://api.github.com/users/barczaG","html_url":"https://github.com/barczaG","followers_url":"https://api.github.com/users/barczaG/followers","following_url":"https://api.github.com/users/barczaG/following{/other_user}","gists_url":"https://api.github.com/users/barczaG/gists{/gist_id}","starred_url":"https://api.github.com/users/barczaG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barczaG/subscriptions","organizations_url":"https://api.github.com/users/barczaG/orgs","repos_url":"https://api.github.com/users/barczaG/repos","events_url":"https://api.github.com/users/barczaG/events{/privacy}","received_events_url":"https://api.github.com/users/barczaG/received_events","type":"User","site_admin":false},"created_at":"2016-06-01T19:56:21Z","updated_at":"2016-06-01T19:56:21Z","body":"Hi @jpauloeti, thanks for you feedback. \r\nCurrently this module is in heavy development and the documentation is outdated :( In the meantime i can provide you some example code:\r\n(Notice that all function now returns a `Promise` and there is no `cb` parameter.\r\nIf you have more questions you can contact me at: https://twitter.com/barczaG. \r\nIf you are interested in Contributing please also contact :)\r\n```\r\nconst readline = require('readline')\r\nconst Fut = require('fut')\r\n// const Promise = require('bluebird')\r\nconst co = require('co')\r\n// const _ = require('underscore')\r\nconst storage = require('node-persist')\r\nstorage.initSync()\r\n\r\nvar rl = readline.createInterface({\r\n  input: process.stdin,\r\n  output: process.stdout\r\n})\r\n\r\nvar fut = new Fut({\r\n  email: '',\r\n  password: '',\r\n  secret: '',\r\n  platform: '',\r\n  captchaHandler: (captcha) => console.log('do something with the captcha'),\r\n  tfAuthHandler: (send) => {\r\n    rl.question('Enter your two factor code:', function (code) {\r\n      send(code)\r\n    })\r\n  },\r\n  // saveVariable: co.wrap(function * (key, val) {\r\n  //   console.log('setting item', key, val)\r\n  //   // storage.setItem(key, val)\r\n  // }),\r\n  saveVariable: (key, val) => {\r\n    console.log('setting item', key)\r\n    storage.setItem(key, val)\r\n  },\r\n  loadVariable: co.wrap(function * (key) {\r\n    console.log('getting item', key)\r\n    var item = storage.getItem(key)\r\n    return item\r\n    // return storage.getItem(key)\r\n  })\r\n})\r\n\r\nco(function * () {\r\n  yield fut.login()\r\n  let resp = yield fut.getCredits()\r\n  console.log(resp)\r\n}).catch((e) => console.log(e.stack))\r\n```"}}
{"actor":{"display_login":"barczaG"}}