om2m-rest

0.0.3 • Public • Published

om2m-rest

oneM2M REST api.

NPM

npm npm


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.

Readme

Keywords

none

Package Sidebar

Install

npm i om2m-rest

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • peter.eb