SpiderStrategies / node-tweet-stream

Node twitter module to hook into the public filter streaming, seamlessly updating the tracking keywords.
210 stars 43 forks source link

Added function for tracking multiple words at once. #24

Closed TylerPachal closed 9 years ago

TylerPachal commented 9 years ago

I've added a function which takes a list of keywords and adds them all to filters.tracking.

For each of the terms in the keywords array, the addFilter() function is called like:

this.addFilter(FILTER_TYPE_TRACKING, keywords[index], false)

I am passing false as the value for reconnect so that if a large list of keywords is passed, then we are not reconnecting a bunch of times.

At the end of the function I perform one reconnect if necessary.

Also aded the corresponding test case.

-Tyler

neilmcgibbon commented 9 years ago

Why is this not merged in - seems very useful to avoid heavy reconnects and subsequent rate limiting?

nathanbowser commented 9 years ago

Sorry, I forgot about it. I'll clean things up and publish a new release.

nathanbowser commented 9 years ago

Cleaned up the commit and merged.

Release 1.7.0