2.0.2 • Published 5 years ago
rodo-sdk-node v2.0.2
RODO merchant SDK
Rodo SDK is a client library for the MERCHANTS USING RODO’S LOCK SERVICES TO KEEP A TRACK OF THEIR LOCKS. THIS LIBRARY IS WRITTEN IN NODE JS.
Installation
npm install rodo-sdk-node
Example
var Rodo=require("rodo-sdk-node");
var rodo=new Rodo("<merchant_id>");
rodo.location("<imei>", data=>{
console.log(data);
})
API
rodo.location(imei, callback)
Fetches the realtime location of the lock with a particular IMEI number.
- imei is the IMEI number of the lock you want to track.
- callback - function(data) gives you the location on a realtime basis.
rodo.locations(callback)
Fetches the realtime location of all locks under your merchant ID.
- callback - function(data) fires an array of realtime locations of all locks belonging to the particular merchant.
rodo.nfc(callback)
- callback - function(data) fires whenever a lock is intended to be unlocked using an NFC card. `
rodo.status(imei, callback)
Listens for changes in a particular lock's status(locked/unlocked);
- imei is the IMEI number of the lock.
- callback - function(data) fires when the particular lock gets locked or unlocked.
rodo.statuses(callback)
Listens for changes in all lock statuses and returns status of all locks.(locked/unlocked);
- callback - function(data) fires whenenver a lock gets locked or unlocked.
rodo.individualStatus(callback)
Listens for changes in all lock statuses and returns the status of the lock which was affected individually.(locked/unlocked);
- callback - function(data) fires whenenver a lock gets locked or unlocked.