Skip to content
This repository has been archived by the owner on May 15, 2019. It is now read-only.

dyaa/meteor-digitalocean

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meteor-Digitalocean

Build Status

The Package allows you to communicate with the DigitalOcean API V2 from MeteorJS in a promise friendly manner. It also supports automatic request retries.

This Package based on icodeforlove's NodeJS wrapper, And the documentation here is based on his README.md.

DigitalOcean

Easily deploy an SSD cloud server on DigitalOcean in 55 seconds. Sign up using my link and receive $10 in credit.

Installation

This module is published in AtmosphereJS:

meteor add dyaa:digitalocean

Usage

// Import a module
var api = new Digitalocean({token:'my_token'});

// Get things done
api.dropletGetAll().then(function (droplets) {
	console.log(droplets);
});

Config

new Digitalocean({
	token: 'my_token',
	itemsPerPage: 100, // default=100
	maxRetries: 5, // default=5
	raw: false // default=false
});

Pagination

you can pass pagination params into any method that has a body or query argument.

api.dropletGetAll({per_page: 1, page: 2}).then(function (droplets) {
	console.log(droplets);
});

Raw

if you set raw it will return the full response body with request info and ratelimiting details, the default is false.

api.accountGet(true)

would return

	{
		account: {
			droplet_limit: 25,
			email: 'email@domain.com',
			uuid: 'f5bbaffce3a8792421593a7075b486bafd66672f',
			email_verified: true
		},
		ratelimit: {
			limit: '5000',
			remaining: '4993',
			reset: '1434197547'
		},
		requestinfo: {
			id: 'a24427fd-0d43-9536-a206-zac22d2696e1',
			runtime: '0.038537'
		 }
	}

and with raw set to false (the default), it would return

	{
		droplet_limit: 25,
		email: 'email@domain.com',
		uuid: 'f5bbaffce3a8792421593a7075b486bafd66672f',
		email_verified: true
	}

Methods

All methods follow the official API documentation.

Droplets

Account

Regions

Images

SSH keys

Sizes

Domains

Actions

Floating IPs

License

Copyright (c) 2015 Dyaa Eldin Moustafa Licensed under the MIT license.

About

DigitalOcean Nodejs wrapper for MeteorJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages