Yet another Twitter's API library for Node.js, yes.
Testing
In order to get testing done, first create the file test/config.json
with the following format:
{
"consumer_key": "Your credential from Twitter's Developer Interface",
"consumer_secret": "Your credential from Twitter's Developer Interface",
"token": "Your credential from Twitter's Developer Interface",
"token_secret": "Your credential from Twitter's Developer Interface",
"callback": "Either your callback or `oob` if is a desktop app"
}
Now run:
npm test
Known Issues
- There's no testing unit for
OAuth.proto.accessToken
but the example uses it.
Using
var Twitter = require('twitter-rest-lite'),
keys,
tt, ttoauth, ttapi;
keys = { consumer_key: 'blahblahblah', consumer_secret: 'blahblahblah', callback: '...' };
tt = new Twitter(keys);
ttoauth = new Twitter.OAuth(keys);
keys['token'] = '...';
keys['token_secret'] = '...';
ttapi = new Twitter.API(keys);
ttapi.get('/statuses/mentions_timeline.json', params, function(err, response) {
...
});
Documentation
http://ghostbar.github.io/twitter-rest-lite and/or
docs/
and/or the code itself. It's the same documentation.
License and author
© 2013-2014, Jose Luis Rivas <me@ghostbar.co>
. Licensed under the MIT terms. A copy of the license is on the file LICENSE
.