Ubidots class

UJL main class

This is the main class for interacting with the library. This class has the following properties and methods:

Properties

PropertyTypeDescription

devices

devices

Provides access to methods and filters regarding Devices

variables

variables

Provides access to methods and filters regarding variables

Methods

MethodArgumentsDescription

authenticate

A valid Ubidots token

Authenticates with the Ubidots API.

It is implemented as a Singleton which is already instantiated at the exporting, thus, there is no need for creating an instance of it, instead, you can use it directly:

// Import the class
const { Ubidots } = require('@ubidots/ubidots-javascript-library');
// Call 'authenticate' method with no prior instantatio of 'Ubidots'
Ubidots.authenticate('ubidots-valid-token');

that exposes the Ubidots entities as properties.

Last updated