Skip to content

Commit

Permalink
By default, try to extract credentials from the environment
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Jun 9, 2012
1 parent 122f6e5 commit 32e3fde
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,21 @@ 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

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
Expand Down
8 changes: 4 additions & 4 deletions lib/twitter/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand All @@ -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
Expand Down

0 comments on commit 32e3fde

Please sign in to comment.