Class: DesignerNews::Client
Defined Under Namespace
Modules: Users
Instance Attribute Summary
Attributes included from Configurable
#access_token, #api_endpoint, #middleware, #user_agent
Instance Method Summary
collapse
Methods included from Users
#me
Methods included from Connection
#connection, #request
#configure, keys, #reset!
#token_authenticated?
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
25
26
27
28
29
|
# File 'lib/designer_news/client.rb', line 25
def initialize(options={})
DesignerNews::Configurable.keys.each do |key|
instance_variable_set(:"@#{key}", options[key] || DesignerNews.instance_variable_get(:"@#{key}"))
end
end
|
Instance Method Details
#delete(url, options = {}) ⇒ Object
43
44
45
|
# File 'lib/designer_news/client.rb', line 43
def delete(url, options = {})
request :delete, url, options
end
|
#get(url, options = {}) ⇒ Object
31
32
33
|
# File 'lib/designer_news/client.rb', line 31
def get(url, options = {})
request :get, url, options
end
|
#post(url, options = {}) ⇒ Object
35
36
37
|
# File 'lib/designer_news/client.rb', line 35
def post(url, options = {})
request :post, url, options
end
|
#put(url, options = {}) ⇒ Object
39
40
41
|
# File 'lib/designer_news/client.rb', line 39
def put(url, options = {})
request :put, url, options
end
|