Sha256: 1cb4749cf1017d45360cb0d421989bc2eb1802fa1e4815e8f99a8c1e20bba877
Contents?: true
Size: 850 Bytes
Versions: 4
Compression:
Stored size: 850 Bytes
Contents
module NestConnect class API class Devices class Structure < API def initialize(structure_id) @structure_id = structure_id end def put(body) connection.put do |request| request.url(url) request.headers.merge!(headers) request.body = body end end def get connection.get do |request| request.url(url) request.headers.merge!(headers) end end private attr_reader :structure_id def url "devices/structures/#{structure_id}" end def headers { 'Content-Type' => 'application/json', 'Authorization' => "Bearer #{access_token}" } end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems