Class: Oodler::WebClient
- Inherits:
-
Object
- Object
- Oodler::WebClient
- Includes:
- HTTParty
- Defined in:
- lib/oodler/web_client.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
Instance Method Summary collapse
- #get(path, options) ⇒ Object
-
#initialize(key = nil) ⇒ WebClient
constructor
A new instance of WebClient.
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
#key ⇒ Object
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,) [:query] ||={} [:query].merge!({:key => @key}) if @key validate_parameters() self.class.get(path,) end |