API::PleskExpand - OOP interface to the Plesk Expand XML API (http://www.parallels.com/en/products/plesk/expand/).


API-PleskExpand documentation  | view source Contained in the API-PleskExpand distribution.

Index


NAME

Top

API::PleskExpand - OOP interface to the Plesk Expand XML API (http://www.parallels.com/en/products/plesk/expand/).

SYNOPSIS

Top

    use API::PleskExpand;
    use API::Plesk::Response;

    my $expand_client = API::PleskExpand->new(%params);
    my $res = $expand_client->Func_Module->operation_type(%params);

    if ($res->is_success) {
        $res->get_data; # return arr ref of answer blocks
    }

DESCRIPTION

Top

At present the module provides interaction with Plesk Expand 2.2.4 (API 2.2.4.1). Complete support of operations with Accounts, partial support of work with domains. Support of addition of domains to user Accounts.

API::PleskExpand module gives the convenient interface for addition of new functions. Extensions represent modules in a folder Plesk with definitions of demanded functions. Each demanded operation is described by two functions: op and op_response_parse. The first sub generates XML query to Plesk, the second is responsible for parse XML answer and its representation in Perl Native Structures. As a template for a writing of own expansions is better to use API/PleskExpand/Accounts.pm. In module API::Plesk::Methods we can find service functions for a writing our extensions.

For example, here the set of subs in the Accounts module is those.

  create  / create_response_parse
  modify  / modify_response_parse
  delete  / delete_response_parse
  get     / get_response_parse

EXPORT

Top

Nothing.

METHODS

Top

new(%params)

Create new class instance.

Required params: api_version -- default: 2.2.4.1 username -- Expand user name (root as default). password -- Expand password. url -- full url to Expand XML RPC gate (https://ip.ad.dr.ess::8442/webgate.php').

AUTOLOADed methods

All other methods are loaded by Autoload from corresponding modules. Execute some operations (see API::PleskExpand::* modules documentation).

Example:

  my $res = $expand_client->Func_Module->operation_type(%params); 
  # Func_Module -- module in API/PleskExpand folder
  # operation_type -- sub which defined in Func_Module.
  # params hash used as @_ for operation_type sub.

AUTHOR

Top

Odintsov Pavel <nrg[at]cpan.org>

COPYRIGHT AND LICENSE

Top


API-PleskExpand documentation  | view source Contained in the API-PleskExpand distribution.