How to build a streaming API client?

Check out this post for a similar use case involving twitter.