OCB - sender
ocb - sender is a npm module that handle a NGSI Object for them transportation to FIWARE Orion Context Broker. It makes possible send context information in easy way to the FIWARE Ecosystem.
Index navigation
- How to Install
- Import npm module
- Module Usage
- License
How to install
npm install ocb-sender
or
yarn add ocb-sender
Import npm module.
ES5
var cb = require('ocb-sender');
ES6
import OCB as cb from ocb-sender;
Module Usage
Connection configuration with Orion ContextBroker.
cb.config(urlContextBroker, port, version)
.then((result) => console.log(result))
.catch((err) => console.log(err))
Example
cb.config('http://207.249.127.149',1026,'v2')
.then((result) => console.log(result))
.catch((err) => console.log(err))
Retrieve Orion ContextBroker API Resources.
Example
cb.retrieveAPIResources()
.then((result) => console.log(result))
.catch((err) console.log(err))
Get EntityType of ContextBroker.
Example
cb.getEntityType("Device")
.then((result) => console.log(result))
.catch((err) => console.log(err))
Get EntityTypes of ContextBroker.
Example
cb.getEntityTypes()
.then((result) => console.dir(result))
.catch((err) => console.log(err))
License
MIT