https://github.com/petereb/om2m-rest
oneM2M REST api.
https://github.com/petereb/om2m-rest
om2m onem2m rest
Last synced: 11 months ago
JSON representation
oneM2M REST api.
- Host: GitHub
- URL: https://github.com/petereb/om2m-rest
- Owner: PeterEB
- License: mit
- Created: 2018-01-19T03:43:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-23T04:04:23.000Z (over 8 years ago)
- Last Synced: 2025-06-24T12:46:12.058Z (12 months ago)
- Topics: om2m, onem2m, rest
- Language: JavaScript
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# om2m-rest
oneM2M REST api.
[](https://nodei.co/npm/om2m-rest/)
[](https://www.npmjs.com/package/om2m-rest)
[](https://www.npmjs.com/package/om2m-rest)
## Documentation
Please visit the [Wiki](https://github.com/PeterEB/om2m-rest/wiki).
## Overview
oneM2M REST api.
## Installation
> $ npm install om2m-rest --save
## Usage
```js
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.createDataInst('MY_SENSOR', 'DATA', temperature, { sensorValue: 25.6 }, function (err, msg) {
console.log(msg);
});
```
## License
Licensed under [MIT](https://github.com/PeterEB/om2m-rest/blob/master/LICENSE).