TweetStream inside an already running EventMachine reactor in which you can define EM::Timer or EM::PeriodicTimer If you require interval-based timers, it is possible to run We have removed the on_interval callback. It offers functionality parity with twitter-stream while also supporting several new features. twitter-stream has been replaced with em-twitter. We've replaced the underlying gem that connects to the streaming API. identity map) will be automatically inherited by TweetStream. Allows boolean methods to be called with a question mark (e.g.Īdditionally, any new features that are added to objects in the.The #created_at method returns a Date instead of a String.Object equivalence ( #= returns true if #ids are the same).These objects are already defined in the twitter gem and are superior to the custom objects in the following ways: TweetStream now emits objects from the Twitter gem instead of custom hashes. Site Streams are now fully supported, including the connection management functionality. Should plan to move to OAuth as soon as possible. OAuth is now the default authentication method. The complete list refer to the (CHANGELOG.md#version-200).
TweetStream 2.0 introduces a number of requested features and bug fixes. With the methods available on the Streaming API wiki page. The methods available to TweetStream::Client are kept in parity # Use 'follow' to follow a group of user ids (integers, not screen names) TweetStream::('term1', 'term2') do |status| User ids: # Use 'track' to track a list of single-word keywords You can also use it to track keywords or follow a given set of # The status object is a special Hash with # your Twitter account's Streaming API role. # This will pull a sample of all tweets based on Using TweetStream is quite simple: require 'tweetstream'Ĭnsumer_key = 'abcdefghijklmnopqrstuvwxyz'Ĭonfig.oauth_token = 'abcdefghijklmnopqrstuvwxyz' TweetStream provides simple Ruby access to Twitter's Streaming API.