README.md in twitter-5.8.0 vs README.md in twitter-5.9.0

- old
+ new

@@ -74,30 +74,26 @@ Note: `oauth_token` has been renamed to `access_token` and `oauth_token_secret` is now `access_token_secret` to conform to the terminology used in Twitter's developer documentation. ### Streaming (Experimental) -This library now offers support for the [Twitter Streaming API][streaming]. We -previously recommended using [TweetStream][] for this, however [TweetStream -does not work on Ruby 2.0.0][bug]. +This library now offers support for the [Twitter Streaming API][streaming]. [streaming]: https://dev.twitter.com/docs/streaming-apis [tweetstream]: http://rubygems.org/gems/tweetstream -[bug]: https://github.com/tweetstream/tweetstream/issues/117 Site Streams are restricted to whitelisted accounts. To apply for access, [follow the steps in the Site Streams documentation][site-streams]. [User Streams][user-streams] do not require prior approval. [site-streams]: https://dev.twitter.com/docs/streaming-apis/streams/site#Applying_for_access [user-streams]: https://dev.twitter.com/docs/streaming-apis/streams/user Unlike the rest of this library, this feature is not well tested and not -recommended for production applications. That said, if you need to do Twitter -streaming on Ruby 2.0.0, this is probably your best option. I've decided to -ship it as an experimental feature and make it more robust over time. Patches -in this area are particularly welcome. +recommended for production applications. I've decided to ship it as an +experimental feature and make it more robust over time. Patches in this area are +particularly welcome. Hopefully, by the time version 6 is released, this gem can fully replace [TweetStream][], [em-twitter][], [twitterstream][], and [twitter-stream]. Special thanks to [Steve Agalloco][spagalloco], [Tim Carey-Smith][halorgium], and [Tony Arcieri][tarcieri] for helping to develop this feature. @@ -151,16 +147,16 @@ end end ``` An `object` may be one of the following: -* Twitter::DirectMessage -* Twitter::Streaming::DeletedTweet -* Twitter::Streaming::Event -* Twitter::Streaming::FriendList -* Twitter::Streaming::StallWarning -* Twitter::Tweet +* `Twitter::DirectMessage` +* `Twitter::Streaming::DeletedTweet` +* `Twitter::Streaming::Event` +* `Twitter::Streaming::FriendList` +* `Twitter::Streaming::StallWarning` +* `Twitter::Tweet` ### Cursors The `Twitter::Cursor` class has been completely redesigned with a focus on simplicity and performance. @@ -386,15 +382,10 @@ * `#lists_owned` is now `#owned_lists` * `#saved_search_create` is now `#create_saved_search` * `#saved_search_destroy` is now `#destroy_saved_search` * `#status_destroy` is now `#destroy_status` -### Errors -The `Twitter::Error::ClientError` and `Twitter::Error::ServerError` class -hierarchy has been removed. All errors now inherit directly from -`Twitter::Error`. - ### Null Objects In version 4, methods you would expect to return a `Twitter` object would return `nil` if that object was missing. This may have resulted in a `NoMethodError`. To prevent such errors, you may have introduced checks for the truthiness of the response, for example: @@ -465,26 +456,9 @@ After configuration, requests can be made like so: ```ruby client.update("I'm tweeting with @gem!") -``` - -### Middleware -The Faraday middleware stack is fully configurable and is exposed as a -`Faraday::RackBuilder` object. You can modify the default middleware in-place: - -```ruby -client.middleware.insert_after Twitter::Response::RaiseError, CustomMiddleware -``` - -A custom adapter may be set as part of a custom middleware stack: - -```ruby -client.middleware = Faraday::RackBuilder.new do |faraday| - # Specify a middleware stack here - faraday.adapter :some_other_adapter -end ``` ## Usage Examples All examples require an authenticated Twitter client. See the section on <a href="#configuration">configuration</a>.