node-twitter
node-twitter copied to clipboard
A graceful way to connect/disconnect from streams to switch filters?
I'm using the streaming API to get real-time tweets for a specific location; however, the user may want tweets relevant to another geolocation after awhile, and currently the way I think to do this would be to destroy the stream, then wait X-amount of time, and attempt to re-connect with different args.
Is there a better way to do this?
What you've described is the right way to do this, and is actually quite fast. Here's a test with twitter-lite, a modern Node/browser Twitter client library.