Class: Commands

Commands(networkPropertiesopt)

new Commands(networkPropertiesopt)

Parameters:
Name Type Attributes Default Description
networkProperties Object <optional>
{}
Properties
Name Type Attributes Default Description
endpointUrl String defines the Http(s) endpoint URL
tls Boolean defines is use Http or Https secure protocol for fetching data
streamProtocol String <optional>
'ws' the Stream protocol to use: 'ws' pr 'mqtt'
mqttOpts Object <optional>
{} the Mqtt options if stream protocol is 'mqtt'
Properties
Name Type Description
prefix String the Mqtt prefix value
endpointUrl String the Mqtt specific endpointUrl
Source:

Methods

(async) getCommandById(commandId) → {Promise.<Command>}

Get a specific command resource by ID
Parameters:
Name Type Description
commandId string ID of requested command
Source:
Returns:
- The corresponding Command
Type
Promise.<Command>

(async) searchCommands(commandFilteropt, pageSizeopt) → {Promise.<Collection.<Command>>}

List or search all commands available through this API.
Parameters:
Name Type Attributes Default Description
commandFilter CommandFilter <optional>
new CommandFilter() default Command filter
pageSize Number <optional>
10 default page size
Source:
Returns:
- A Collection of Command
Type
Promise.<Collection.<Command>>

Commands(networkPropertiesopt)

new Commands(networkPropertiesopt)

Parameters:
Name Type Attributes Default Description
networkProperties Object <optional>
{}
Properties
Name Type Attributes Default Description
endpointUrl String defines the Http(s) endpoint URL
tls Boolean defines is use Http or Https secure protocol for fetching data
streamProtocol String <optional>
'ws' the Stream protocol to use: 'ws' pr 'mqtt'
mqttOpts Object <optional>
{} the Mqtt options if stream protocol is 'mqtt'
Properties
Name Type Description
prefix String the Mqtt prefix value
endpointUrl String the Mqtt specific endpointUrl
Source:

Methods

(async) getCommandById(commandId) → {Promise.<Command>}

Get a specific command resource by ID
Parameters:
Name Type Description
commandId string ID of requested command
Source:
Returns:
- The corresponding Command
Type
Promise.<Command>

(async) searchCommands(commandFilteropt, pageSizeopt) → {Promise.<Collection.<Command>>}

List or search all commands available through this API.
Parameters:
Name Type Attributes Default Description
commandFilter CommandFilter <optional>
new CommandFilter() default Command filter
pageSize Number <optional>
10 default page size
Source:
Returns:
- A Collection of Command
Type
Promise.<Collection.<Command>>