class Rhapsody::Request
Constants
- HOST_URL
Attributes
faraday[RW]
Public Class Methods
new(options)
click to toggle source
# File lib/rhapsody/request.rb, line 8 def initialize(options) @faraday = Faraday.new(:url => HOST_URL) do |faraday| faraday.request :url_encoded faraday.adapter Faraday.default_adapter if options[:access_token] faraday.authorization :Bearer, options[:access_token] end if options[:api_key] && options[:api_secret] faraday.basic_auth(options[:api_key], options[:api_secret]) end end end