【文件属性】:
文件名称:blu-twit:Twit 模块的包装器,它使用 Bluebird 承诺库添加返回承诺的 `getAsync` 和 `postAsync` 方法
文件大小:3KB
文件格式:ZIP
更新时间:2021-07-06 11:15:20
蓝智
Twit 模块的包装器,它使用 Bluebird 承诺库添加返回承诺的getAsync和postAsync方法
用法
由于 Twit 回调返回多个值,我们使用 Bluebird 的spread函数使事情变得更容易:
var BluTwit = require ( './blu-twit.js' ) ;
var bt = new BluTwit ( {
consumer_key : '...'
, consumer_secret : '...'
, access_token : '...'
, access_token_secret : '...'
} )
// tweet 'hello world!'
bt . postAsync ( 'statuses/update' , { status : 'hello wo
【文件预览】:
blu-twit-master
----blu-twit.js(223B)
----LICENSE(1KB)
----test()
--------blu-twit.tests.js(2KB)
----README.md(1KB)
----.gitignore(48B)
----package.json(667B)