creachadair / twitter

A Go client for the Twitter v2 API (in development).
MIT License
31 stars 2 forks source link

Add support for the streaming search API #2

Closed creachadair closed 4 years ago

creachadair commented 4 years ago

See https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/api-reference/get-tweets-search-stream et seq.

Streaming will require another client method to read from the body progressively. The caller will probably have to plumb in a callback, and we'll have to do something to handle cancellation. Provisionally: When ctx ends, force-close the body to unblock the reader. I'm not sure if that's racy, or if it will trigger a panic, so do some experiments.

creachadair commented 4 years ago

Done in a74f8e0a et seq.