NAME
WebService::DigitalOcean::Role::UserAgent - User Agent Role for DigitalOcean WebService
VERSION
version 0.026
DESCRIPTION
Role used to make requests to the DigitalOcean API, and to format their response.
METHODS
make_request
my $res = $self->make_request(POST => '/domains', {
name => 'example.com',
ip_address => '12.34.56.78',
});
Arguments
Str
$method-
The HTTP verb, such as POST, GET, PUT, etc.
Str
$path-
Path to the resource in the URI, to be prepended with $self->api_base_url.
HashRef
$data (optional)-
The content to be JSON encoded and sent to DigitalOcean's API.
Returns
HashRef containing:
- HTTP::Response response_object
Bool
is_success-
Shortcut to $res->{response_object}{is_success}.
Str
status_line-
Shortcut to $res->{response_object}{status_line}.
HashRef
content-
The JSON decoded content the API has responded with.
HashRef
ratelimit-
RateLimit headers parsed.
Int
limitInt
remaining- DateTime reset
Makes requests to the DigitalOcean, and parses the response.
All requests made from other methods use "make_request" to make them.
More info: https://developers.digitalocean.com/#introduction.
AUTHOR
André Walker <andre@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2015 by André Walker.
This is free software, licensed under:
The GNU General Public License, Version 2, June 1991