my $cp = cPanel::APIClient->create( service => 'cpanel', transport => [ 'MojoUserAgent', hostname => 'greathosting.net', # For testing only: # tls_verification => 'off', ], credentials => { username => 'hugh', api_token -> 'MYTOKEN', }, );
This module allows Mojo::UserAgent to serve as transport for asynchronous cPanel API calls.
It supports username/password or username/api_token credentials schemes. See cPanel::APIClient for more details.
username
password
api_token
credentials
It expects these parameters:
hostname - Required. The remote hostname that will serve the API calls.
hostname
tls_verification - Optional. Either on (default) or off.
tls_verification
on
off
cPanel::APIClient::Transport::NetCurlPromiser can also integrate with Mojolicious but requires Net::Curl, which you’ll need C compiler access to install.
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.
To install cPanel::APIClient, copy and paste the appropriate command in to your terminal.
cpanm
cpanm cPanel::APIClient
CPAN shell
perl -MCPAN -e shell install cPanel::APIClient
For more information on module installation, please visit the detailed CPAN module installation guide.