2.4.4 • Published 6 years ago
ocb-sender v2.4.4
OCB - sender
What is 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.
Indéx navigation
- How to Install
- Import npm module
- Module Usage General Functions Connection configuration with Orion ContextBroker Retrieve Orion ContextBroker API Rescources Get EntityType of ContextBroker Get EntitytTypes of ContextBroker Specific Functions Entities Functions Subscriptions Functions * Query Functions
- License
How to install
npm install ocb-sender
Import npm module.
ES5
var cb = require('ocb-sender');
ES6
import OCB as cb from ocb-sender;
Module Usage
Headers
For the examples we will use the next JSON as headers
var headers = {
'Fiware-Correlator': '3451e5c2-226d-11e6-aaf0-d48564c29d20'
}
But you can use another options,one empty JSON or you can ignore the headers if you don't need them
Connection configuration with Orion ContextBroker.
cb.config(urlContextBroker, headers)
.then((result) => console.log(result))
.catch((err) => console.log(err))
Example
cb.config('http://207.249.127.149:1026/v2/', headers) .then((result) => console.log(result)) .catch((err) => console.log(err))
Retrieve Orion ContextBroker API Rescources.
Example
cb.retrieveAPIResources(headers) .then((result) => console.log(result)) .catch((err) console.log(err))
Get EntityType of ContextBroker.
Example
cb.getEntityType("Device", headers) .then((result) => console.log(result)) .catch((err) => console.log(err))
Get EntityTypes of ContextBroker.
Example
cb.getEntityTypes(headers) .then((result) => console.log(result)) .catch((err) => console.log(err))
License
MIT
2.4.4
6 years ago
2.4.3
6 years ago
2.4.2
6 years ago
2.4.1
6 years ago
2.4.0
6 years ago
2.3.1
6 years ago
2.2.1
6 years ago
2.1.1
6 years ago
2.1.0
6 years ago
2.0.1
6 years ago
2.0.0
6 years ago
1.5.4
6 years ago
1.5.3
6 years ago
1.5.2
6 years ago
1.5.1
6 years ago
1.5.0
6 years ago
1.4.1
6 years ago
1.4.0
6 years ago
1.3.0
7 years ago
1.1.3
7 years ago
1.1.2
7 years ago
1.1.1
7 years ago
1.1.0
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago
0.1.3
7 years ago