-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support Stream interface #3
Comments
I'm completely in favor of this. When I get some time next, I'll look at the custom stream parser this uses, and see if I can make it inherit from stream.Stream like it should. |
you could also just wrap the api in a instance of stream, so that twit.stream(opts) returns a new Stream, then, maybe, streamify the underling implmentation later. |
This looks like it's really simple to do. Just replace and return the And then add |
and destroy() isn't the response line seperated json? if so just pipe it through hmm, just realized parse is undocumented... On Wed, Jul 18, 2012 at 1:16 PM, Roly Fentanes
|
I created a module for parsing coutinuous json strings https://github.com/fent/node-jstream Might be faster for this since data can be streamed into the parser. It uses clarinet |
you should also use this: https://github.com/fent/node-streamify then instead of going: twitter.stream(query, function (err, stream) {
stream.pipe(...)
}) you could do this: twitter.stream(query).pipe(whereEver) which is way less typing! |
I think that's a great idea. If somebody doesn't beat me to it with a PR, I'll have a look this weekend. |
Added filter stream support
hey this is really cool, but it would be even cooler if it supported the
Stream
interface.like, you could change this:
to this:
I'm also working on a toolkit for working with streams, https://github.com/dominictarr/event-stream that might have some useful examples.
The text was updated successfully, but these errors were encountered: