Device Builder
DeviceBuilder
DeviceBuilder Objects
class DeviceBuilder()Device builder. This builder give you the necessary tools to create a device using our OpenGate REST.
constructor
function constructor()Constructor
Arguments:
ogapiInternalOpenGateAPI - this is ogapi instanceorganizationstring - this is the organization name where device will be createdallowedDatastreamsarray (optional) - Allowed datastreams to add into the new devicedefinedSchemasarray (optional) - Jsonschema about all OpenGate specific typesjsonSchemaValidatorValidator (optional) - Json schema validator toolmsnumber - timeout in milliseconds
create
function create() -> 'Promise'This invoke a request to OpenGate North API and the callback is managed by promises This function create a entity of provision
Returns:
Promise
Example:
ogapi.organizationsBuilder().create()update
function update() -> 'Promise'This invoke a request to OpenGate North API and the callback is managed by promises This function updates a entity of provision and check if any subscriber/subscription exits or no. If a subscriber/subscription not exists then this entities will be created and after that will be added to entity box.
Returns:
Promise
Example:
ogapi.entityBuilder.devicesBuilder().update()