Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example using the stsplatform module using callbacks.
sts = require('../stsplatform');
// Create a Client.
var client = new sts.Client();
// Create a sensor object, referencing the client/
var sensor = new sts.Sensors(client, 'calderonroberto.demo');
// Get the sensor information (print the response code)
sensor.get(null, function(error,response){
console.log(">>> Sensor Info");
// Create a Data object using a sensor
var data = new sts.Data(sensor);
// Print some data (last element)
data.get({beforeE:1}, function(error, response){
console.log(">>> Data");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.