Class: Sunscout::SolarLog::Client
- Inherits:
-
Object
- Object
- Sunscout::SolarLog::Client
- Defined in:
- lib/sunscout/solar_log/client.rb
Overview
Low-level binding to the SolarLog HTTP API
Instance Method Summary collapse
-
#get_data ⇒ Hash<Symbol, String|Integer>
Retrieve data from the HTTP API.
-
#initialize(host) ⇒ Client
constructor
Initialize a new instance of the class.
Constructor Details
#initialize(host) ⇒ Client
Initialize a new instance of the class.
21 22 23 |
# File 'lib/sunscout/solar_log/client.rb', line 21 def initialize(host) @host = host end |
Instance Method Details
#get_data ⇒ Hash<Symbol, String|Integer>
Retrieve data from the HTTP API.
27 28 29 30 31 32 33 |
# File 'lib/sunscout/solar_log/client.rb', line 27 def get_data uri = build_uri req = build_request(uri) data = send_request(req, uri) data end |