Class: RdioApi::Client

Inherits:
Object
  • Object
show all
Includes:
Api
Defined in:
lib/rdio_api/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Api

#method_missing, #respond_to?

Constructor Details

#initialize(options = {}) ⇒ Client

Initialize the client for API request. A consumer key and consumer secret are required. Requests on behalf of the user require access_token (oauth token)



13
14
15
16
17
# File 'lib/rdio_api/client.rb', line 13

def initialize(options={})
  @consumer_key    = options[:consumer_key]
  @consumer_secret = options[:consumer_secret]
  @access_token    = options[:access_token]
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RdioApi::Api

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token.



8
9
10
# File 'lib/rdio_api/client.rb', line 8

def access_token
  @access_token
end

#consumer_keyObject (readonly)

Returns the value of attribute consumer_key.



7
8
9
# File 'lib/rdio_api/client.rb', line 7

def consumer_key
  @consumer_key
end

#consumer_secretObject (readonly)

Returns the value of attribute consumer_secret.



7
8
9
# File 'lib/rdio_api/client.rb', line 7

def consumer_secret
  @consumer_secret
end