API for MeteorJS

Visit site

A MeteorJS Package for version 2 of DigitalOcean's API

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 © 2015 Dyaa Eldin Moustafa Licensed under the MIT license.

by: Dyaa EldinNovember 17, 2015Visit site

Was this helpful?
 
Leave a comment


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Publish your Tool on Community

Have you created an Integration, API Wrapper, Service, or other Tool that helps developers build on DigitalOcean? Help users find it by listing it in Community Tools.

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.