NAME

WebService::DigitalOcean - Access the DigitalOcean RESTful API (v2)

VERSION

version 0.001

SYNOPSIS

use WebService::DigitalOcean;

my $do = WebService::DigitalOcean->new(
    token => $TOKEN,
);

my $res = $do->domain_create(
    name => 'example.com',
    ip_address => '127.0.0.1',
);

if ($res->{is_success}) {
    say $res->{content}{domain}{name};
}
else {
    say "Could not create domain";
}

DESCRIPTION

This module implements DigitalOceans new RESTful API.

It's on a very early stage of development, so expect new features, better docs and tests very soon.

Patches welcome: https://github.com/andrewalker/p5-webservice-digitalocean

ATTRIBUTES

api_base_url

A string prepended to all API endpoints. By default, it's https://api.digitalocean.com/v2. This can be adjusted to facilitate tests.

token

The authorization token. It can be retrieved by logging into one's DigitalOcean account, and generating a personal token here: https://cloud.digitalocean.com/settings/applications.

SEE ALSO

CAVEATS

This is alpha software. The interface is unstable, and may change without notice.

Also, there are no real unit tests. We currently only test compilation and instantiation of the module.

AUTHOR

André Walker <andre@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2014 by André Walker.

This is free software, licensed under:

The GNU General Public License, Version 2, June 1991