Class: RedHaze::Request

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/red_haze/request.rb

Class Method Summary collapse

Class Method Details

.setup(client_id, access_token = nil) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/red_haze/request.rb', line 9

def self.setup(client_id,access_token=nil)
  params = {}
  if access_token
    base_uri 'https://api.soundcloud.com'
    params[:oauth_token] = access_token
  else
    base_uri 'http://api.soundcloud.com'
    params[:client_id] = client_id
  end
  default_params params
end