Methods

This page describes the available methods within the HTML Canvas class

HTML Canvas methods

getHeaders

Arguments: None

Signature: ubidots.getHeaders()

Return:

{
  Authorization: "Bearer receivedJWTToken",
  Content-type: "application/json"
}

openDrawer

Arguments: options: Object [mandatory] => An object containing the content's url and the drawer's width in px:

{
    url: "https://url.com",
    width: 500 // Read as 500px
}

Signature:

ubidots.openDrawer(
    {
        url: "https://some-url",
        width: <width>
    }
);
    

Return: None

setDashboardDevice

Arguments: deviceId: string [Mandatory] =>The ID of the device that you want to set.

Signature: ubidots.setDashboardDevice(<deviceId>)

Return: None

setDashboardDateRange

Arguments: timeframe: Object [Mandatory] => An object containing the start and end timestamps:

Copy

{
    "startTime": 1642282088000,
    "endTime": 1673818088000
}

Signature: ubidots.setDashboardDateRange(<timeframe>)

Return: None

setRealTime

Arguments: rt: Bool [Mandatory] => A boolean indicating the real time update setting

Signature: ubidots.setRealTime(<rt>)

Return: None

refreshDashboard

Arguments: None

Signature: ubidots.refreshDashboard()

Return: None

setFullScreen

Arguments: screenSetting: string(toggle | enable | disabled) [Mandatory] => A string representing the full screen setting.

Signature: ubidots.setFullScreen(<screenSetting>)

Return: None

Last updated