This is a Node.js client for the Smart Citizen API.
$ npm install smart-citizen-node-api
First, you need to call the module and set your API key. You can obtain your API key from your SmartCitizen Profile.
var smartCitizen = require("smart-citizen-node-api");
var client = smartCitizen(your_api_key);
Then you can start using the SmartCitizen API.
For example, to get all the devices associated to your account, you can use:
client.devices.listAll(function(err, result){
if (err) return;
// do something with your data
});
client.devices.listAll( function(err, result) {...} )
client.sensors.listAll( function(err, result) {...} )
client.users.listAll( function(err, result) {...} )
client.users.me( function(err, result) {...} )
client.measurements.listAll( function(err, result) {...} )
client.kits.listAll( function(err, result) {...} )
client.components.listAll( function(err, result) {...} )
This project depends on request to make HTTP requests.
See something you think can be improved? Open an issue or clone the project and send a pull request with your changes.