Streams the public Twitter stream.
Note that the output is the "raw" Twitter stream, so you'll need to process it appropriately. Processing was deliberately left out of this module, so that you can choose your poison(s) via npm.
- Node.js version 0.11.x (for the
harmonyflag which exposes generators)
- Keys obtained from dev.twitter.com after setting up a new app
$ npm install stweam --save
// => example.jsvar Stweam = ;var stream = ;var dest = ;var stweam =consumerKey: 'consumerKey'consumerSecret: 'consumerSecret'token: 'token'tokenSecret: 'tokenSecret';// Optionally hook into log messages...stweam;// ... or warn messages.stweam;// stweam is a Stream.stweam;stweamlanguage'fr'start;
$ node --harmony example.js
Also, check out chirp to see
Stweam in action.
var stweam = new Stweam(opts)
Initialise a new
Stweam with the given
opts should contain:
Set the phrases that will determine what is delivered on the stream.
Set the Tweet language, defaults to
Set the users whose Tweets will be delivered on the stream.
Start the app.
Note: I like Bunyan's opinions on log levels :)
Provides detail about regular operation, rather than spamming stdout.
Might want to take a closer look at this one.
$ npm run test:spec
To generate a coverage report:
$ npm run test:cov