Class: Oodler::WebClient

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/oodler/web_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key = nil) ⇒ WebClient

Returns a new instance of WebClient.



9
10
11
# File 'lib/oodler/web_client.rb', line 9

def initialize(key=nil)
  @key = key
end

Instance Attribute Details

#keyObject

Returns the value of attribute key.



5
6
7
# File 'lib/oodler/web_client.rb', line 5

def key
  @key
end

Instance Method Details

#get(path, options) ⇒ Object



13
14
15
16
17
18
# File 'lib/oodler/web_client.rb', line 13

def get(path,options)
  options[:query] ||={}
  options[:query].merge!({:key => @key}) if @key
  validate_parameters(options)
  self.class.get(path,options)
end