RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

DefinitionController

Controller Class for Definitions

Constructor

new DefinitionController()

Source

Methods

static

create(siteId, createData) → {Promise.<DefinitionModel>}

Create a Definition [POST /sites/{siteId}/definitions]

Parameters

  • siteId number

    The Site ID

  • createData DefinitionController.CreateData

    The Definition Create Data

Returns

  • Promise.<DefinitionModel>

Source

static

delete(siteId, id) → {Promise.<boolean>}

Delete a Definition [DELETE /sites/{siteId}/definitions/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Definition ID

Returns

  • Promise.<boolean>

Source

static

getAll(siteId, queryParametersopt) → {Promise.<Array.<DefinitionModel>>}

List all Definitions [GET /sites/{siteId}/definitions]

Parameters

  • siteId number

    The Site ID

  • queryParameters DefinitionController.GetAllQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<DefinitionModel>>

Source

static

getOne(siteId, id) → {Promise.<DefinitionModel>}

Retrieve a Definition [GET /sites/{siteId}/definitions/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Definition ID

Returns

  • Promise.<DefinitionModel>

Source

static

update(siteId, id, updateData) → {Promise.<DefinitionModel>}

Update a Definition [PATCH /sites/{siteId}/definitions/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Definition ID

  • updateData DefinitionController.UpdateData

    The Definition Update Data

Returns

  • Promise.<DefinitionModel>

Source

Type Definitions

CreateData

The Create Data for a Definition

Type

  • Object

Properties

  • keyIndex string <optional>

    The Definition Key Index

  • type string

    The Definition Type

  • data Object <optional>

    The Definition Data

Source

GetAllQueryParameters

The Optional Query Parameters for the getAll Function

Type

  • Object

Properties

  • keyIndex string <optional>

    The Definition Key Index

  • type string <optional>

    The Definition Type

Source