3.0.0 • Published 8 years ago
twonet v3.0.0
TwoNetAPI
An npm module that implements the Qualcomm Life 2net API. This implementation currently supports revision Y of the API.
Methods
getHubs()
getHub()
activateHub()
deactiveHub()
activateHubStatus()
activateDevice()
deactivateDevice()
getDevice()
getDevices()
createDevice()
registerDevice()
associateDevice()
deviceCommand()
deviceCommandStatus()
updateDevicePassthrough()Installation
npm install twonetRunning utility scripts
The package provides several scripts for common tasks used with a fleet of hubs.
Before using the CLI, add your customer_id and auth_key to the lib/config.js file.
A list of available CLI commands:
npm run helpUsage
var api = new TwoNetAPI(YOUR_CUST_ID, YOUR_AUTH_KEY, REGION, ENV);
api.getHubs(function(status, hubs) {
if( status < 0 ) {
console.log('Failed api.getHubs() : ' + status);
}
hubs.forEach(function(h) {
console.dir(h);
});
});