diff --git a/README.md b/README.md index ab9579033..d3b1c751e 100644 --- a/README.md +++ b/README.md @@ -77,12 +77,12 @@ this method returned an array of `Twitter::Status` objects, which is now accessible by sending the `results` message to a `Twitter::SearchResults` object. - # Version 2 +##### Version 2 Twitter::Client.search("query").each do |status| puts status.full_text end - # Version 3 +##### Version 3 Twitter::Client.search("query").results.each do |status| puts status.full_text end @@ -90,8 +90,8 @@ object. The `Twitter::Status#expanded_urls` method has been removed. Use `Twitter::Status#urls` instead. -Support for API proxies via `gateway` configuration has been removed. This -still be implemented by inserting custom Faraday middleware. +Support for API gateways via `gateway` configuration has been removed. This +may still be implemented by inserting custom Faraday middleware. The `Twitter::Error::EnhanceYourCalm` class has been removed, since all Search API requests are made via api.twitter.com, which does not return HTTP 420. When diff --git a/lib/twitter/config.rb b/lib/twitter/config.rb index a57326e2a..4eb6c04f3 100644 --- a/lib/twitter/config.rb +++ b/lib/twitter/config.rb @@ -11,10 +11,10 @@ module Config DEFAULT_CONNECTION_OPTIONS = {} # The consumer key if none is set - DEFAULT_CONSUMER_KEY = nil + DEFAULT_CONSUMER_KEY = ENV['TWITTER_CONSUMER_KEY'] # The consumer secret if none is set - DEFAULT_CONSUMER_SECRET = nil + DEFAULT_CONSUMER_SECRET = ENV['TWITTER_CONSUMER_SECRET'] # The endpoint that will be used to connect if none is set # @@ -29,10 +29,10 @@ module Config DEFAULT_MEDIA_ENDPOINT = 'https://upload.twitter.com' # The oauth token if none is set - DEFAULT_OAUTH_TOKEN = nil + DEFAULT_OAUTH_TOKEN = ENV['TWITTER_OAUTH_TOKEN'] # The oauth token secret if none is set - DEFAULT_OAUTH_TOKEN_SECRET = nil + DEFAULT_OAUTH_TOKEN_SECRET = ENV['TWITTER_OAUTH_TOKEN_SECRET'] # The proxy server if none is set DEFAULT_PROXY = nil