Skip to content
This repository has been archived by the owner. It is now read-only.
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

PHP wrapper for the Digital Ocean API

This is a PHP wrapper class of the Digital Ocean API. All methods are supported.

Documentation for the Digital Ocean API can be found here.

Automatically generated phpDoc live here.

Example Usage

require_once('DigitalOcean.class.php');
$ocean = new \DigitalOceanApi\DigitalOcean('client_id_here','api_key_here');
$droplets = get_object_vars($ocean->getDroplets());
$i=0;
$x=0;
foreach ($droplets as $drops) {
	if (!is_array($drops)) {
		echo $i . '. Status: ' . $drops . '<br />';
	} else {
		echo $i . '. Name: ' . $drops[$x]->name . '<br />';
		echo $i . '. IP: ' . $drops[$x]->ip_address . '<br />';
		$x++;
	}
	$i++;
}

The above will result in something like this:

0. Status: OK
1. Name: your-droplet-name
1. IP: your-droplet-ip

About

DEPRECATED!

Resources

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.