README.md 1001 Bytes
Newer Older
Simon Welsh's avatar
Simon Welsh committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
# DigitalOcean API wrapper for Hack

This is a set of classes and types written in [Hack][hack] that provides
wrappers for the [DigitalOcean][do] API.

## Installation

1. Clone this repostiroy
2. Include the `src/_91Carriage/Droplets/types.php` file
3. Set your PSR-0/2 autoloader to load the `_91Carriage/Droplets` namespace from
the `src/_91Carriage/Droplets` folder.

As everything is in the `_91Carriage/Droplets` namespace, that will not be
included in any class/type names throughtout the rest of this document.

## Usage

To retrive all your droplets, get an API key from the [DigitalOcean][do] console
then call `Droplet::get_all_droplets('YOUR_API_KEY')`. This will return a `Map`
from the droplet's name to its reprenestation in the API.

More functionality is coming soon.

## License

See the [license file][license] for the full text of the license this code is
released under.

[hack]: http://hacklang.org/
[do]: https://www.digitalocean.com/?refcode=c6bd41b8b2f5
[license]: LICENSE.md