NAME
cPanel::APIClient::Service::whm - WebHost Manager access
SYNOPSIS
If your transport uses blocking I/O:
my $resp = $client->call_api1('listaccts', \%args);
my $pops_ar = $resp->get_data();
If your transport uses non-blocking I/O:
my $call = $client->call_api1('listaccts', \%args);
$call->promise()->then( sub {
my ($resp) = @_;
my $pops_ar = $resp->get_data();
} );
Some non-blocking transports support canceling in-progress requests, thus:
$client->cancel($call, ..);
See your transport’s documentation for more details.
DESCRIPTION
This class stores a WHM API access configuration and exposes methods to call WHM APIs. It extends cPanel::APIClient::Service.
Don’t try to create this object directly; instead, let cPanel::APIClient-
create()> do it for you.
METHODS
OBJ->call_api1( $FUNCTION_NAME, \%ARGUMENTS )
Calls WHM API v1.
OBJ’s transport configuration will determine what precisely is returned; however, it should eventually yield a cPanel::APIClient::Response::WHM1 instance.
See cPanel’s WHM API v1 documentation for documentation of the available API functions.
OBJ->call_cpanel_uapi( $USERNAME, $MODULE_NAME, $FUNCTION_NAME, \%ARGUMENTS )
Like call_api1()
but calls cPanel UAPI from a WHM connection. Its eventual yield will be a cPanel::APIClient::Response::UAPI instance.
LICENSE
Copyright 2020 cPanel, L. L. C. All rights reserved. http://cpanel.net
This is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.