Module: Rhapsody::FaradayConnection
- Defined in:
- lib/rhapsody/helpers/faraday_connection.rb
Class Method Summary collapse
Class Method Details
.prepare_authentication ⇒ Object
4 5 6 7 8 9 |
# File 'lib/rhapsody/helpers/faraday_connection.rb', line 4 def self.prepare_authentication Faraday.new(:url => Rhapsody::HOST_URL) do |faraday| faraday.request :url_encoded faraday.adapter Faraday.default_adapter end end |
.prepare_authorization(access_token) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/rhapsody/helpers/faraday_connection.rb', line 11 def self.(access_token) Faraday.new(:url => Rhapsody::HOST_URL) do |faraday| faraday.request :url_encoded faraday.adapter Faraday.default_adapter faraday. :Bearer, access_token end end |