Class: NestConnect::API::Devices::Protect

Inherits:
NestConnect::API show all
Defined in:
lib/nest_connect/api/devices/protect.rb

Instance Method Summary collapse

Methods inherited from NestConnect::API

#access_token

Constructor Details

#initialize(device_id, access_token: nil) ⇒ Protect

Returns a new instance of Protect.



5
6
7
8
# File 'lib/nest_connect/api/devices/protect.rb', line 5

def initialize(device_id, access_token: nil)
  @device_id = device_id
  @access_token = access_token
end

Instance Method Details

#getObject



10
11
12
13
14
15
# File 'lib/nest_connect/api/devices/protect.rb', line 10

def get
  connection.get do |request|
    request.url(url)
    request.headers.merge!(headers)
  end
end