knet-client

0.1.0 • Public • Published

KNet Client

A client library to talk with KNet.

Initialising the KNet client

var KNetClient = require('knet-client');
 
var options = {
  "host": "knet.local"
, "username": "********"
, "password": "********"
};
 
knet = new KNetClient(options);

Avaliable commands

knet.listRoles(callback);
knet.listStrategies(callback);
knet.listSquadrons(callback);
knet.listDrones(callback);
knet.listMachines(callback);
 
knet.getRole(roleId, callback);
knet.getStrategy(strategyId, callback);
knet.getSquadron(strategyId, callback);
knet.getDrone(droneId, callback);
knet.getDroneStderrs(droneId, callback);
knet.getDroneStdouts(droneId, callback);
 
knet.upsertRole(roleId, data, callback);
knet.upsertStrategy(strategyId, data, callback);
 
knet.deleteRole(roleId, callback);
knet.deleteStrategy(strategyId, callback);
 
knet.decommissionDrone(droneId, callback);
knet.stopDrone(droneId, callback);

Example

knet.listRoles(function(err, res, roles) {
  // roles is an array of objects
});

Readme

Keywords

none

Package Sidebar

Install

npm i knet-client

Weekly Downloads

0

Version

0.1.0

License

none

Last publish

Collaborators

  • coen-hyde