Twurl -H /1.1/statuses/sample.json > tweets.json returns a never ending huge output json file



twurl -H /1.1/statuses/sample.json > tweets.json command on my windows console gives C:/Ruby200-x64/lib/ruby/2.0.0/net/http/response.rb:357:in `finish’: buffer error (Zlib::BufError) when i try to terminate the command after ten minutes using CTRL+C , and the output file ‘tweets.json’ is a huge file that is almost 30 MB.

Where am I going wrong? Please help.


That’s what the streaming api is. You may be looking for the REST api. The stream api is basically a never ending file that just keeps updating, you’re meant to consume it as it renders.


Oh! Thank you so much. I will look into the REST API then.