NAME
Webservice::OVH - A perl representation of the ovh-api
SYNOPSIS
use Webservice::OVH;
my $ovh = Webservice::OVH->new("credentials.json");
my $ovh = Webservice::OVH->new(application_key => $key, application_secret => $secret, consumer_key => $token);
my $services = $ovh->domain->services;
foreach my $service (@$services) {
my $last_update = $service->last_update;
print $last_update->datetime;
}
DESCRIPTION
This module reflects the path structure of the ovh web-api. This is the base object from where all api calls originate.
This module uses the perl api module provided by ovh.
METHODS
new_from_json
Creates an api Object based on credentials in a json File
Parameter: $file_json - dir to json file
Return: Webservice::OVH
Synopsis: Webservice::OVH->new_from_json("path/file");
application_key is generated when creating an application via ovh web interface
application_secret is generated when creating an application via ovh web interface
consumer_key must be requested through ovh authentification
timeout timeout in milliseconds, warning some request may take a while
new
Create the api object. Credentials are given directly via %params Credentials can be generated via ovh web interface and ovh authentification
Parameter: %params - application_key => value, application_secret => value, consumer_key => value
Return: Webservice::OVH
Synopsis: Webservice::OVH->new(application_key => $key, application_secret => $secret, consumer_key => $token);
set_timeout
Sets the timeout of the underlying LWP::Agent
Parameter: timeout - in milliseconds default 120
Synopsis: Webservice::OVH->set_timeout(120);
domain
Main access to all /domain/ api methods
Return: Webservice::OVH::Domain
Synopsis: $ovh->domain;
me
Main access to all /me/ api methods
Return: Webservice::OVH::Me
Synopsis: $ovh->me;
order
Main access to all /order/ api methods
Return: Webservice::OVH::Order
Synopsis: $ovh->order;
Main access to all /email/ api methods
Return: Webservice::OVH::Email
Synopsis: $ovh->email;
cloud
Main access to all /cloud/ api methods
Return: Webservice::OVH::Cloud
Synopsis: $ovh->cloud;
AUTHOR
Patrick Jendral
COPYRIGHT AND LICENSE
This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.