Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

digitalocean-api

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

digitalocean-api

DigitalOcean API wrapper

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-62.5%
Maintainers
1
Weekly downloads
 
Created
Source

digitalocean-api

The digitalocean-api is a module that allows you to communicate with the DigitalOcean API from node.js

Installation

This module is published in NPM:

npm install digitalocean-api --save

The --save tells NPM to automatically add it to your package.json file

Usage

// Import a module
var DigitalOceanAPI = require('digitalocean-api');
// Create an instance with your API credentials
var api = new DigitalOceanAPI('client_id', 'api_key');

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

Methods

All methods follow the official API documentation.

Convention for callback arguments: callback(error, data)

Droplets

dropletGetAll(callback)
dropletGet(id, callback)
dropletNew(name, sizeId, imageId, regionId, sshKeyIds, callback)
dropletRebootHard(id, callback)
dropletPowerCycle(id, callback)
dropletShutdown(id, callback)
dropletPowerOff(id, callback)
dropletPowerOn(id, callback)
dropletResetRootPassword(id, callback)
dropletResize(id, sizeId, callback)
dropletSnapshot(id, name, callback)
dropletRestore(id, imageId, callback)
dropletRebuild(id, imageId, callback)
dropletBackupEnable(id, callback)
dropletBackupDisable(id, callback)
dropletDestroy(id, callback)

Sizes

sizeGetAll(callback)

Images

imageGetAll(callback)
imageGetGlobal(callback)
imageGetMine(callback)
imageGet(id, callback)
imageDestroy(id, callback)

SSH keys

sshKeyGetAll(callback)
sshKeyGet(id, callback)
sshKeyAdd(name, pubKey, callback)
sshKeyEdit(id, pubKey, callback)
sshKeyDestroy(id, callback)

Regions

regionGetAll(callback)

Keywords

FAQs

Package last updated on 14 Aug 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc