1.0.0 • Published 8 years ago

node-fleet v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

node-fleet is a client library for interacting with the fleet REST API.

Creating the client

There are two ways of creating the client:

1). Use one of the included API definitions 2). Let the client find the API discovery document and use it for generation

Using an included version

var NodeFleet = require('node-fleet');

var client = new NodeFleet.Client({
	host: 'fleet-api-test',
	port: 10000,
	secure: false,
	apiVersion: 'v1-alpha'
});

client.Machines.List()
.then(function(machines){
	console.log(machines);
});

Generate from a live disvocery document

var NodeFleet = require('node-fleet');

NodeFleet.ClientFromDiscovery({
	host: 'fleet-api-test',
	port: 10000,
	secure: false,
	apiVersion: 'v1-alpha'
})
.then(function(client){
	client.Machines.List()
	.then(function(machines){
		console.log(machines);
	});
});
1.0.0

8 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago