Class: HTCC::Scheduler
- Inherits:
-
Object
- Object
- HTCC::Scheduler
- Defined in:
- lib/htcc/scheduler.rb
Instance Attribute Summary collapse
-
#device_id ⇒ Object
readonly
Returns the value of attribute device_id.
Instance Method Summary collapse
- #get_schedule ⇒ Object
-
#initialize(device_id, client) ⇒ Scheduler
constructor
A new instance of Scheduler.
Constructor Details
#initialize(device_id, client) ⇒ Scheduler
Returns a new instance of Scheduler.
7 8 9 10 |
# File 'lib/htcc/scheduler.rb', line 7 def initialize(device_id, client) @device_id = device_id @client = client end |
Instance Attribute Details
#device_id ⇒ Object (readonly)
Returns the value of attribute device_id.
5 6 7 |
# File 'lib/htcc/scheduler.rb', line 5 def device_id @device_id end |
Instance Method Details
#get_schedule ⇒ Object
12 13 14 15 |
# File 'lib/htcc/scheduler.rb', line 12 def get_schedule resp = @client.send(:request, "/Device/Menu/GetScheduleData/#{device_id}", method: 'post') @schedule = JSON.parse(resp.body) end |