Class: StormRETS
Instance Attribute Summary collapse
-
#api_key ⇒ Object
debug_output $stdout.
-
#end_point ⇒ Object
debug_output $stdout.
-
#format ⇒ Object
debug_output $stdout.
Instance Method Summary collapse
-
#initialize(api_key, end_point, format) ⇒ StormRETS
constructor
A new instance of StormRETS.
- #search(options = {}) ⇒ Object
Constructor Details
#initialize(api_key, end_point, format) ⇒ StormRETS
Returns a new instance of StormRETS.
10 11 12 13 14 |
# File 'lib/stormrets.rb', line 10 def initialize(api_key, end_point, format) @api_key = api_key @end_point = end_point @format = format end |
Instance Attribute Details
#api_key ⇒ Object
debug_output $stdout
8 9 10 |
# File 'lib/stormrets.rb', line 8 def api_key @api_key end |
#end_point ⇒ Object
debug_output $stdout
8 9 10 |
# File 'lib/stormrets.rb', line 8 def end_point @end_point end |
#format ⇒ Object
debug_output $stdout
8 9 10 |
# File 'lib/stormrets.rb', line 8 def format @format end |
Instance Method Details
#search(options = {}) ⇒ Object
16 17 18 19 |
# File 'lib/stormrets.rb', line 16 def search(={}) .merge!({:apikey => @api_key}) data = self.class.get("http://www.stormrets.com#{@end_point}.#{@format}", :query => ) end |