{"action":"created","issue":{"url":"https://api.github.com/repos/realtymaps/promise-ftp/issues/26","repository_url":"https://api.github.com/repos/realtymaps/promise-ftp","labels_url":"https://api.github.com/repos/realtymaps/promise-ftp/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/realtymaps/promise-ftp/issues/26/comments","events_url":"https://api.github.com/repos/realtymaps/promise-ftp/issues/26/events","html_url":"https://github.com/realtymaps/promise-ftp/issues/26","id":289361080,"number":26,"title":"unable to call the method as prototype","user":{"login":"aakashkumar667","id":35538689,"avatar_url":"https://avatars0.githubusercontent.com/u/35538689?v=4","gravatar_id":"","url":"https://api.github.com/users/aakashkumar667","html_url":"https://github.com/aakashkumar667","followers_url":"https://api.github.com/users/aakashkumar667/followers","following_url":"https://api.github.com/users/aakashkumar667/following{/other_user}","gists_url":"https://api.github.com/users/aakashkumar667/gists{/gist_id}","starred_url":"https://api.github.com/users/aakashkumar667/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aakashkumar667/subscriptions","organizations_url":"https://api.github.com/users/aakashkumar667/orgs","repos_url":"https://api.github.com/users/aakashkumar667/repos","events_url":"https://api.github.com/users/aakashkumar667/events{/privacy}","received_events_url":"https://api.github.com/users/aakashkumar667/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-01-17T18:06:16Z","updated_at":"2018-02-02T16:11:14Z","closed_at":null,"author_association":"NONE","body":"Hi Team,\r\nI need your help my code is as shown below,\r\n\r\nvar PromiseFtp = require('promise-sftp');\r\n  \r\n var ftp = new PromiseFtp();\r\n\r\n  ftp.connect({host: 'host', user: 'username', password: 'password'});\r\n\r\n  ftp.readdir('/')\r\n\r\nI am getting the following error\r\n Unhandled rejection FtpConnectionError: can't perform 'readdir' command when connection status is: not yet connected\r\n\r\nbut i want to create one user per session I do not want to access like a constructor, please help on same\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/realtymaps/promise-ftp/issues/comments/362629480","html_url":"https://github.com/realtymaps/promise-ftp/issues/26#issuecomment-362629480","issue_url":"https://api.github.com/repos/realtymaps/promise-ftp/issues/26","id":362629480,"user":{"login":"zacronos","id":3067460,"avatar_url":"https://avatars3.githubusercontent.com/u/3067460?v=4","gravatar_id":"","url":"https://api.github.com/users/zacronos","html_url":"https://github.com/zacronos","followers_url":"https://api.github.com/users/zacronos/followers","following_url":"https://api.github.com/users/zacronos/following{/other_user}","gists_url":"https://api.github.com/users/zacronos/gists{/gist_id}","starred_url":"https://api.github.com/users/zacronos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zacronos/subscriptions","organizations_url":"https://api.github.com/users/zacronos/orgs","repos_url":"https://api.github.com/users/zacronos/repos","events_url":"https://api.github.com/users/zacronos/events{/privacy}","received_events_url":"https://api.github.com/users/zacronos/received_events","type":"User","site_admin":false},"created_at":"2018-02-02T16:11:14Z","updated_at":"2018-02-02T16:11:14Z","author_association":"OWNER","body":"I suggest you look into how promises work -- see http://bluebirdjs.com/docs/why-promises.html as a starting place.\r\n\r\nYou need to chain your commands together, promise-style.  Try this instead:\r\n```javascript\r\nftp.connect({host: 'host', user: 'username', password: 'password'})\r\n.then(function () {\r\n  ftp.readdir('/')\r\n})\r\n```"}}
{"actor":{"display_login":"zacronos"}}