README.md in tweetstream-1.1.0.rc1 vs README.md in tweetstream-1.1.0.rc2

- old
+ new

@@ -49,10 +49,37 @@ end The methods available to TweetStream::Client will be kept in parity with the methods available on the Streaming API wiki page. +Using the Twitter Userstream +---------------------------- + +Using the Twitter userstream works similarly to the regular streaming, except you use the userstream method. + + # Use 'userstream' to get message from your stream + TweetStream::Client.new.userstream do |status| + puts status.text + end + + +You also can use method hooks for both regular timeline statuses and direct messages. + + client = TweetStream::Client.new + + client.on_direct_message do |direct_message| + puts "direct message" + puts direct_message.text + end + + client.on_timeline_status do |status| + puts "timeline status" + puts status.text + end + + client.userstream + Configuration and Changes in 1.1.0 ---------------------------------- As of version 1.1.0.rc1 TweetStream supports OAuth. Please note that in order to support OAuth, the `TweetStream::Client` initializer no longer accepts a @@ -94,12 +121,11 @@ TweetStream.configure do |config| .. config.parser = :yajl end. -Available options are `:yajl`, `:json_gem` (default), -`:json_pure`, and `:active_support`. +Available options are `:yajl`, `:json_gem`, `:json_pure`, and `:ok_json`. Handling Deletes and Rate Limitations ------------------------------------- Sometimes the Streaming API will send messages other than statuses. @@ -187,20 +213,19 @@ It is also possible to create a daemonized script quite easily using the TweetStream library: # The third argument is an optional process name - TweetStream::Daemon.new('username','password', 'tracker').track('term1', 'term2') do |status| + TweetStream::Daemon.new('tracker').track('term1', 'term2') do |status| # do something in the background end -If you put the above into a script and run the script with `ruby scriptname.rb`, you will see a list of daemonization commands such -as start, stop, and run. +If you put the above into a script and run the script with `ruby scriptname.rb`, +you will see a list of daemonization commands such as start, stop, and run. TODO ---- -* UserStream support * SiteStream support Note on Patches/Pull Requests -----------------------------