With the Twitter Stream API, you can only open one stream at a time, so if you want to track different kinds of keywords (aka channels), all the tweets in result will be mixed up and you’ll need to do some post-processing to identify which tweet belongs to which channels.

I needed that kind of feature for my next project, so I decided to make a module out of it. Feel free to use it. Some infos you might be interested in :

  • The API documentation (generated from source code with yuidoc)
  • The github repo (with the README)
  • twitter-stream-channels on npmnpm install twitter-stream-channels
  • The module has a complete built-in mock version accessible via .getMockedClass() that will let you use it without connecting to Twitter (usefull because of their connexion limit)
  • It also is unit-tested, if you want to contribute (first time I made unit-tests on node with mocked data dispatched by events – by the way, I improved test’s speed using process.nextTick instead of setTimeout in mocked mode).

I’m currently working on a project based on twitter-stream-channels that I wil release in a few weeks.


edit : I just released the project I was talking about. More about it on this post.

2 thoughts on “twitter-stream-channels

  1. Hi Adrian,

    I’m glad that you enjoy twitter-stream-channels.

    Writing a TypeScript definition for this module is a great idea. I’ve reviewed your PR on github (I have used TypeScript in the passed but never wrote any .d.ts files – so I made comments more about the API fit than best practices, other people will do that).


Leave a Reply

Your email address will not be published. Required fields are marked *