Methods

async static

create(params) → Promise containing ApiResponse

creates a new template

Parameters

Name Type Optional Description

params

Object

 

Values in params have the following properties:

Name Type Optional Description

deviceId

string

Yes

template

Object

 

template.name

string

 

template.functionalities

array

 

template.connections

array

 

template.imageURL

string

Yes

Returns

Promise containing ApiResponse 

async static

get([params]) → Promise containing ApiResponse

fetches a template

Parameters

Name Type Optional Description

params

object

Yes

Values in params have the following properties:

Name Type Optional Description

deviceId

string

Yes

Returns

Promise containing ApiResponse 

async static

list([params]) → Promise containing ApiResponse

fetches a list of templates

Parameters

Name Type Optional Description

params

object

Yes

Values in params have the following properties:

Name Type Optional Description

deviceId

string

Yes

Returns

Promise containing ApiResponse 

async static

remove(templateId) → Promise containing ApiResponse

deletes a template

Parameter

Name Type Optional Description

templateId

string

 

Returns

Promise containing ApiResponse 

async static

update(templateId, body) → Promise containing ApiResponse

updates a template

Parameters

Name Type Optional Description

templateId

string

 

body

Object

 

Values in body have the following properties:

Name Type Optional Description

templateData

Object

 

templateData.name

string

Yes

templateData.functionalities

array

Yes

templateData.connections

array

Yes

templateData.deviceId

string

Yes

templateData.imageURL

string

Yes

Returns

Promise containing ApiResponse