Class: HTCC::Settings
- Inherits:
-
Object
- Object
- HTCC::Settings
- Defined in:
- lib/htcc/settings.rb
Instance Attribute Summary collapse
-
#device_id ⇒ Object
readonly
Returns the value of attribute device_id.
Instance Method Summary collapse
-
#initialize(device_id, client) ⇒ Settings
constructor
A new instance of Settings.
- #update(payload) ⇒ Object
Constructor Details
#initialize(device_id, client) ⇒ Settings
7 8 9 10 |
# File 'lib/htcc/settings.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/settings.rb', line 5 def device_id @device_id end |
Instance Method Details
#update(payload) ⇒ Object
12 13 14 15 |
# File 'lib/htcc/settings.rb', line 12 def update(payload) resp = @client.send(:request, '/Device/Menu/Settings', method: 'post', data: payload) JSON.parse(resp.body) end |