Sha256: b689e8ceaa874384534c3c9382488b2baa9ecc9175212003a632296a401993e1
Contents?: true
Size: 530 Bytes
Versions: 2
Compression:
Stored size: 530 Bytes
Contents
require 'faraday' class Rhapsody::Request HOST_URL = 'https://api.rhapsody.com' attr_accessor :faraday 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 end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rhapsody-0.1.1 | lib/rhapsody/request.rb |
rhapsody-0.1.0 | lib/rhapsody/request.rb |