cl
cpanel-lib
npm i cpanel-lib
cl

cpanel-lib

Node.js library for the cPanel/WHM API

by Valentin Hăloiu

0.0.5 (see all)License:MITTypeScript:Not Found
npm i cpanel-lib
Readme

build status

Node.js library for the cPanel/WHM API

Instalation

$ npm install cpanel-lib

Usage

var cpanel = require('cpanel-lib');

var options = {
    host: 'whm.example.com',
    port: 2087,
    secure: true,
    username: 'WHM_USERNAME',
    accessKey: 'YOUR_ACCESS_KEY',
    ignoreCertError: true
};

var cpanelClient = cpanel.createClient(options);

cpanelClient.call('version', {}, function (err, res) {
    console.log('WHM Version: %j', res.version);
});

cpanelClient.call('listaccts', {}, function (err, res) {
    console.log('Result: %j', res);
});

cpanelClient.callApi2('AddonDomain', 'listaddondomains', {}, function (err, res) {
    console.log('Result: %j', res);
});

API

cpanelClient.call(action, params, callback)
cpanelClient.callApi1(module, func, args, [user], callback)
cpanelClient.callApi2(module, func, args, [user], callback)
cpanelClient.callUapi(module, func, args, callback)

Downloads/wk

12

GitHub Stars

39

LAST COMMIT

5yrs ago

MAINTAINERS

1

CONTRIBUTORS

3

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
0.0.5
latest
5yrs ago
No alternatives found
No tutorials found
Add a tutorial