Socket
Socket
Sign inDemoInstall

brokoli

Package Overview
Dependencies
49
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    brokoli

client for fiware orion context broker


Version published
Maintainers
1
Install size
3.77 MB
Created

Readme

Source

brokoli

Brokoli is a client for Orion Context Broker It uses Orion Context Broker as data storage and works around it's stupid design decisions.

intall

npm install brokoli

example


var brokoli = require("brokoli");

var client = brokoli({
	url: "http://user:password@localhost:1026/v1/",
	auth_token: ""
});

// create an entity
client.save(1, {
	bla: "fasel", 
	blub: 1,
	foo: "bar <= baz"
}, function(err, result){
	if (err) return console.log(err);
});

usage

brokoli(opts)

Create an instance of brokoli. Opts may contain

{
	"url": "https://127.0.0.1:1026/v1/",  // base url of orion context broker
	"auth_token": "<auth token>",         // auth token, if needed
	"type": "whatever",                   // global entity type
	"strictssl": true                     // obey/ignore ssl warnings
}

brokoli.save(id, data, fn(err, result))

Save an entity. id is an identifier, data is a key/value object.

brokoli.delete(id, fn(err))

Delete an entity by id.

brokoli.get(id, fn(err, entity))

Get an entity by id:

{
	"id": "<id>",
	"data": {
		"foo": "bar",
		"bla": "fasel",
		"blub": 1
	}
}

brokoli.fetch(fn(err, entities))

Retrieve all entities:

[{
	"id": "<id>",
	"data": {
		"foo": "bar",
		"bla": "fasel",
		"blub": 1
	}
},{
	...
}]

Keywords

FAQs

Last updated on 23 Apr 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc