SkillAgentSearch skills...

Nautical

Wrapper for DigitalOcean's v2 API

Install / Use

/learn @pauldenotter/Nautical
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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

View on GitHub
GitHub Stars30
CategoryDevelopment
Updated9mo ago
Forks9

Languages

JavaScript

Security Score

82/100

Audited on Jun 16, 2025

No findings