Class: Oauth::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/oauth/client.rb

Direct Known Subclasses

FatSecret::Client

Constant Summary collapse

OAUTH_SIGNATURE_METHOD =
'HMAC-SHA1'
OAUTH_VERSION =
'1.0'

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, secret) ⇒ Client

Returns a new instance of Client.



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

def initialize(key, secret) 
  @key = key
  @secret = secret
  setup
end

Class Attribute Details

.formatObject

Returns the value of attribute format.



10
11
12
# File 'lib/oauth/client.rb', line 10

def format
  @format
end

.siteObject

Returns the value of attribute site.



9
10
11
# File 'lib/oauth/client.rb', line 9

def site
  @site
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



6
7
8
# File 'lib/oauth/client.rb', line 6

def key
  @key
end

#paramsObject (readonly)

Returns the value of attribute params.



6
7
8
# File 'lib/oauth/client.rb', line 6

def params
  @params
end

#secretObject (readonly)

Returns the value of attribute secret.



6
7
8
# File 'lib/oauth/client.rb', line 6

def secret
  @secret
end

Instance Method Details

#get(options = {}) ⇒ Object



19
20
21
22
# File 'lib/oauth/client.rb', line 19

def get(options = {})
  params.merge!(options)
  result
end