Class: Kontakt::Config

Inherits:
Auth show all
Defined in:
lib/kontakt.rb

Instance Attribute Summary

Attributes inherited from Configuration

#key

Class Method Summary collapse

Methods inherited from Auth

make_request

Methods inherited from Configuration

#initialize

Constructor Details

This class inherits a constructor from Kontakt::Configuration

Class Method Details

.create(uniqueId, deviceType, options = {}) ⇒ Object



70
71
72
# File 'lib/kontakt.rb', line 70

def self.create(uniqueId, deviceType, options = {})
  return JSON.parse(make_request('post', '/config/create', {}, {:uniqueId => uniqueId, :deviceType => deviceType}.merge(options)).body)
end

.pending(deviceType) ⇒ Object



62
63
64
# File 'lib/kontakt.rb', line 62

def self.pending(deviceType)
  return JSON.parse(make_request('get', '/config', {params: {:deviceType => deviceType}}).body)
end

.pending_by_id(uniqueId) ⇒ Object



66
67
68
# File 'lib/kontakt.rb', line 66

def self.pending_by_id(uniqueId)
  return JSON.parse(make_request('get', '/config/' + uniqueId).body)
end