Class: Helium::Client
- Inherits:
-
Object
- Object
- Helium::Client
- Defined in:
- lib/helium/client.rb,
lib/helium/client/http.rb,
lib/helium/client/users.rb,
lib/helium/client/labels.rb,
lib/helium/client/sensors.rb,
lib/helium/client/elements.rb,
lib/helium/client/organizations.rb
Defined Under Namespace
Modules: Elements, Http, Labels, Organizations, Sensors, Users
Constant Summary
Constants included from Http
Http::API_VERSION, Http::BASE_HTTP_HEADERS, Http::HOST, Http::PROTOCOL
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
Instance Method Summary collapse
- #debug? ⇒ Boolean
-
#initialize(api_key:, debug: false) ⇒ Client
constructor
A new instance of Client.
- #inspect ⇒ Object
Methods included from Elements
#element, #elements, #update_element
Methods included from Labels
#delete_label, #label, #label_sensors, #labels, #new_label, #update_label, #update_label_sensors
Methods included from Sensors
#delete_sensor, #new_sensor, #sensor, #sensor_timeseries, #sensors, #update_sensor
Methods included from Organizations
#organization, #organization_users
Methods included from Users
Methods included from Http
#delete, #get, #paginated_get, #patch, #post
Methods included from Utils
Constructor Details
#initialize(api_key:, debug: false) ⇒ Client
Returns a new instance of Client
20 21 22 23 |
# File 'lib/helium/client.rb', line 20 def initialize(api_key:, debug: false) @api_key = api_key @debug = debug end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key
18 19 20 |
# File 'lib/helium/client.rb', line 18 def api_key @api_key end |
Instance Method Details
#debug? ⇒ Boolean
29 30 31 |
# File 'lib/helium/client.rb', line 29 def debug? @debug == true end |
#inspect ⇒ Object
25 26 27 |
# File 'lib/helium/client.rb', line 25 def inspect "<Helium::Client @debug=#{@debug}>" end |