Class: TACore::Gateway
- Inherits:
-
Auth
- Object
- Configuration
- Auth
- TACore::Gateway
- Defined in:
- lib/tacore/gateway.rb
Overview
> Gateway class methods
Instance Attribute Summary
Attributes inherited from Auth
Attributes inherited from Configuration
#api_key, #api_url, #client_id, #client_secret
Class Method Summary collapse
-
.find(token, client_id, gateway_id) ⇒ Array<Object, Object>
Gets the Gateway by ID.
-
.sees(token, client_id, gateway_id) ⇒ Array<Object, Object>
Shows the devices that are seen by the gateway id.
-
.sees_with_options(token, client_id, gateway_id, options) ⇒ Array<Object, Object>
Shows the devices that are seen by the gateway id with options to query with.
-
.update(token, client_id, gateway_id, gateway = {}) ⇒ Array<Object, Object>
Updates Gateway venue_id.
Methods inherited from Auth
Methods inherited from Configuration
Constructor Details
This class inherits a constructor from TACore::Configuration
Class Method Details
.find(token, client_id, gateway_id) ⇒ Array<Object, Object>
Gets the Gateway by ID
28 29 30 |
# File 'lib/tacore/gateway.rb', line 28 def self.find(token, client_id, gateway_id) request(:get, '/gateway/' + gateway_id.to_s, {}, {token: token, "client-id" => client_id}) end |
.sees(token, client_id, gateway_id) ⇒ Array<Object, Object>
Shows the devices that are seen by the gateway id
9 10 11 |
# File 'lib/tacore/gateway.rb', line 9 def self.sees(token, client_id, gateway_id) request(:get, '/gateway/' + gateway_id.to_s + '/sees', {}, {token: token, "client-id" => client_id}) end |
.sees_with_options(token, client_id, gateway_id, options) ⇒ Array<Object, Object>
Shows the devices that are seen by the gateway id with options to query with
19 20 21 |
# File 'lib/tacore/gateway.rb', line 19 def self.(token, client_id, gateway_id, ) request(:get, '/gateway/' + gateway_id.to_s + '/sees' + '?' + , {}, {token: token, "client-id" => client_id}) end |
.update(token, client_id, gateway_id, gateway = {}) ⇒ Array<Object, Object>
Updates Gateway venue_id
38 39 40 |
# File 'lib/tacore/gateway.rb', line 38 def self.update(token, client_id, gateway_id, gateway = {}) request(:put, '/gateway/' + gateway_id.to_s, gateway, {token: token, "client-id" => client_id}) end |