1.0.0 • Published 9 years ago

nautical v1.0.0

Weekly downloads
13
License
MIT
Repository
github
Last release
9 years ago

It's a wrap(per)

This node module wraps DigitalOcean's v2 API.

Install

Install the module by running the following commands on your command line

$ npm install --save nautical

Usage

It's encouraged to put your DigitalOcean API token in a configuration file like:

File: config.json

{
	"nautical": {
		"token": "your_token_here"
	}
}

Then you can use the wrapper like this:

var config         = require('./config.json').nautical,
	nauticalClient = require('nautical').getClient(config),
	imageList = [];

nauticalClient.images.list(callback);

function callback(err, reply) {
	if (err) throw err;
	console.log({
		responseBody: reply.body,
		statusCode: reply.res.statusCode,
		headers: reply.res.headers
	});

	imageList = imageList.concat(reply.body.images);

	// get the next page
	if ('function' === typeof reply.next)
		reply.next(callback);
	else
		console.log(imageList);
}

Participate in development

Pull requests will be greatly appreciated :)

More information

For more information visit the DigitalOcean developers portal

1.0.0

9 years ago

0.1.2

9 years ago

0.1.1

9 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