Skip to content

nicknick-io/digitalocean

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HEADER This is a wrapper for the Digitalocean API (Issues / Changelog)

Installation

<?php
require 'vendor/autoload.php';
use NickNickIO\Digitalocean\Digitalocean;

$digitalocean = new Digitalocean('your_access_token');

Resources

Account
// Return an account object
$account = $digitalocean->account->get();

Balance (NEW)

// Return the customer balance
$balance = $digitalocean->balance->customer();
Action
// Return a collection of Action objects
$actions = $digitalocean->action->all();

// Return an Action object.
$action = $digitalocean->action->get(123);
Domain
// Return a collection of Domain objects
$domains = $digitalocean->domain->all();

// Return a Domain object
$domain = $digitalocean->domain->get('foo.dk');

// Return the created domain called bar.dk
$domain = $digitalocean->domain->create('bar.dk');

// Delete the domain called baz.dk
$digitalocean->domain->delete('baz.dk');
Domain Record
// Return a collection DomainRecord objects
$records = $digitalocean->domainRecord->all();

// Return a DomainRecord object
$record = $digitalocean->domainRecord->get('baz.dk', 123);
Droplet
// Return a collection of Droplet objects
$droplets = $digitalocean->droplet->all();

// Return a Droplet object
$droplet = $digitalocean->droplet->get(123);

// Return the created droplet
$droplet = $digitalocean->droplet->create([
    'name' => 'test-droplet',
    'image' => 31650475,
    'region' => 'fra1',
    'size' => 's-1vcpu-1gb'
]);

// Delete a droplet
$digitalocean->droplet->delete(123);
Firewall
// List all firewalls
$firewalls = $digitalocean->firewall->all();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages