Module: Foauth
- Defined in:
- lib/foauth.rb,
lib/foauth/version.rb
Defined Under Namespace
Classes: Proxy
Constant Summary collapse
- VERSION =
"0.4.0"
Class Method Summary collapse
-
.new(email = ENV['FOAUTH_EMAIL'], password = ENV['FOAUTH_PASSWORD']) {|builder| ... } ⇒ Faraday::Connection
Creates a new
Faraday
instance using the givenemail
andpassword
.
Class Method Details
.new(email = ENV['FOAUTH_EMAIL'], password = ENV['FOAUTH_PASSWORD']) {|builder| ... } ⇒ Faraday::Connection
Creates a new Faraday
instance using the given email
and password
.
13 14 15 16 17 18 19 20 |
# File 'lib/foauth.rb', line 13 def self.new(email = ENV['FOAUTH_EMAIL'], password = ENV['FOAUTH_PASSWORD']) Faraday.new do |builder| builder.request :foauth_proxy builder.request :basic_auth, email, password builder.adapter Faraday.default_adapter yield builder if block_given? end end |