Node.js Twitter API
Not currently maintained, but PR/issues/questions welcome.
Instantiation & Keys
mtwitter cannot currently help with obtaining access tokens from Twitter, you'll have to do this yourself. For testing and simple apps, the keys can be obtained from dev.twitter.com after setting up a new App.
var Twitter = ;
Normal (client) authentication
var twitter =consumer_key: 'Twitter'consumer_secret: 'API'access_token_key: 'keys'access_token_secret: 'go here';
App-only authentication
var twitter =consumer_key: configkeyconsumer_secret: configsecretapplication_only: true;
REST Interface
The REST interface is managed, which means it transparently handles rate-limiting (it retries requests and doesn't bombard the APIs), and also takes care of fetching and refreshing configuration data as recommended by Twitter.
Synopsis
;;
Additional examples
// Get a user's timelinetwit;// Search for a phrasetwit;// Post a new statusvar content = status: 'Maybe he\'ll finally find his keys. /@peterfalk';twit;
Streaming
For the moment, only "raw" access is available:
twitstream;
Community & Contributions
Originally forked from @AvianFlu's inactive repo,
but reworked heavily, taking inspiration from many people
and their attempts at making it better. Old (pre-rewrite)
contributors can be found in HISTORICAL
. Contributors to
the present iteration can be found in the package.json
.
License: Public Domain.
Style guide: passcod/node-style-guide.
Contributing
See CONTRIBUTING.md
for details
-
Topical branches and standard PR etiquette is preferred.
-
You need to formally agree to release your contribution.
-
Both linting and testing should pass (the Travis build will fail a PR if there are linting errors):
$ npm test$ npm run-script lint