Module: Renstar::APIClient::Query

Included in:
Renstar::APIClient
Defined in:
lib/renstar/api_client/query.rb

Overview

Interface to the “Query” portion of the API This can get general info, settings, runtime data, and alerts

Instance Method Summary collapse

Instance Method Details

#alertsObject



28
29
30
31
32
# File 'lib/renstar/api_client/query.rb', line 28

def alerts
  get('query/alerts')['alerts'].map do |alert|
    Alert.new(alert)
  end
end

#infoObject



12
13
14
# File 'lib/renstar/api_client/query.rb', line 12

def info
  Info.new(get('query/info'))
end

#runtimesObject



22
23
24
25
26
# File 'lib/renstar/api_client/query.rb', line 22

def runtimes
  get('query/runtimes')['runtimes'].map do |runtime|
    Runtime.new(runtime)
  end
end

#sensorsObject



16
17
18
19
20
# File 'lib/renstar/api_client/query.rb', line 16

def sensors
  get('query/sensors')['sensors'].map do |sensor|
    Sensor.new(sensor)
  end
end