VoxPelli Twitter Streamer with support for eg. updating streams
A library for Twitters realtime streaming API that among other things has support for updating a stream on the fly without losing any tweets along the way and special support for tracking tweets from users in a way similar to Twitter lists by filtering away non-related tweets.
It's a work in progress - feel free to fork away but don't expect anything :)
OAuth-credentials: To get them register a Twitter app on https://dev.twitter.com/apps and when you've done so you can get a token for yourself from the configuration page.
require'vptweetstream'streamconsumer_key: 'abc123'consumer_secret: 'abc123'token: 'abc123'token_secret: 'abc123'track : 'keyword1'eventson'tweet'// The full tweet object from Twitter;
var vptweetstream = require'vptweetstream' stream;stream = vptweetstreamstreamconsumer_key: 'abc123'consumer_secret: 'abc123'token: 'abc123'token_secret: 'abc123'follow : 'voxpelli' 'github' // tweets related to @voxpelli or @githubtrack : 'keyword1' 'keyword2' // keyword1 OR keyword2locations :'-122.75,36.8' '-121.75,37.8' // San Fransisco'-74,40' '-73,41' // OR New Yorkrealfollow : true // Only show tweets from someone in the follow array;streameventson'tweet'// The full tweet object from Twitter;streameventson'skip count'// Twitter skipped some tweets due to high volume, this is the amount skipped;// Change what is tracked on the fly// The stream will change to track just "apple" as soon as possiblestreamchangeStream track : 'apple' ;
Twitter's streaming API contains many message types, these are the ones that are currently supported:
Non-supported message types will result in warnings being written to the console.