1. 首页
  2. 考试认证
  3. 其它
  4. blu twit Twit模块的包装器,它使用Bluebird承诺库添加返回承诺的`getAsync`和`postA...

blu twit Twit模块的包装器,它使用Bluebird承诺库添加返回承诺的`getAsync`和`postA...

上传者: 2024-10-13 16:26:14上传 ZIP文件 3.43KB 热度 1次
蓝智Twit模块的包装器,它使用Bluebird承诺库添加返回承诺的getAsync和postAsync方法用法由于Twit回调返回多个值,我们使用Bluebird的spread函数使事情变得更容易: var BluTwit = require ( './blu-twit.js' ) ; var bt = new BluTwit ( { consumer_key : '...' , consumer_secret : '...' , access_token_secret : '...' } ) // tweet 'hello world!' bt . postAsync ( 'statuses/update' , { status : 'hello wo
下载地址
用户评论