wappr/digitalocean

This package is abandoned and no longer maintained. No replacement package was suggested.

A PHP DigitalOcean API Client using Guzzle

0.19.0 2017-03-10 18:29 UTC

README

Build Status v0.21.0

A DigitalOcean PHP client that uses Guzzle by default.

Basic usage

You MUST set the DO_API_TOKEN environment variable set to your DigitalOcean API TOKEN.

Next you need to instantiate one of the resources that are listed below. Each resource has a method that will send a request to DigitalOcean. Those methods require a instantiated request class. The request class construct requires the fields required by DigitalOcean. By using a request class it is impossible to send a request without all the required data. There are sometimes optional fields that get evaluated when using the setter method.

<?php
include 'vendor/autoload.php';
use wappr\digitalocean\Droplets;
use wappr\digitalocean\Requests\Droplets\CreateDropletsRequest;
$droplets = new Droplets;
$droplets->create(new CreateDropletsRequest('name', '512mb', 'nyc1', 'ubuntu-14-04-x64'));

Resources

Help and docs