Class: NestConnect::API::Devices::Structure
- Inherits:
-
NestConnect::API
- Object
- NestConnect::API
- NestConnect::API::Devices::Structure
- Defined in:
- lib/nest_connect/api/devices/structure.rb
Instance Method Summary collapse
- #get ⇒ Object
-
#initialize(structure_id, access_token: nil) ⇒ Structure
constructor
A new instance of Structure.
- #put(body) ⇒ Object
Methods inherited from NestConnect::API
Constructor Details
#initialize(structure_id, access_token: nil) ⇒ Structure
Returns a new instance of Structure.
5 6 7 8 |
# File 'lib/nest_connect/api/devices/structure.rb', line 5 def initialize(structure_id, access_token: nil) @structure_id = structure_id @access_token = access_token end |
Instance Method Details
#get ⇒ Object
18 19 20 21 22 23 |
# File 'lib/nest_connect/api/devices/structure.rb', line 18 def get connection.get do |request| request.url(url) request.headers.merge!(headers) end end |
#put(body) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/nest_connect/api/devices/structure.rb', line 10 def put(body) connection.put do |request| request.url(url) request.headers.merge!(headers) request.body = body end end |