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 ability to filter locations #6

Closed atticoos closed 10 years ago

atticoos commented 10 years ago

Spruced it up a little bit with some location tracking. The approach doesn't change from how you held onto tracking objects, other than creating a sibling location object to track. It's set up like this:

filters = {
  trackings: {}, // same as before, just now part of filters, and sibling of locations
  locations: {}
}

track() is now abstracted by addFilter, which is now used by both track() and location()

untrack() is now abstracted by removeFilter, which is now used by both untrack() and unlocate()

connect() checks if there are either location or tracking filters before connecting.

Also added a couple tests for it.

:)

nathanbowser commented 10 years ago

Thanks! I'm going to make some style changes, then get this in there.

nathanbowser commented 10 years ago

1.3.0 is on npm

atticoos commented 10 years ago

Sweet :+1: :+1: