om2m-rest
v0.0.3
Published
oneM2M REST api.
Downloads
4
Readme
om2m-rest
oneM2M REST api.
Documentation
Please visit the Wiki.
Overview
oneM2M REST api.
Installation
$ npm install om2m-rest --save
Usage
var Om2m = require('om2m-rest');
// initialize om2m configuration
var om2m = new Om2m('192.168.1.112', 8282, 'mn-ces', 'my-mn', 'admin', 'admin');
// create your application
om2m.createApp('MY_SENSOR', 'my_sensor', 'Type/sensor', false, function (err, msg) {
console.log(msg);
});
// create your container
om2m.createCont('MY_SENSOR', 'DATA', 10, function (err, msg) {
console.log(msg);
});
// create your content instance
om2m.createApp('MY_SENSOR', 'DATA', temperature, { sensorValue: 25.6 }, function (err, msg) {
console.log(msg);
});
License
Licensed under MIT.