cpanel-rest-api

0.1.1 • Public • Published

Node.js library for the cPanel/WHM API

Instalation

$ npm install cpanel-rest-api

WHM Usage

var { WHM } = require('cpanel-rest-api');
 
const whm = new WHM({
    host: 'whm.example.com',
    username: 'WHM_USERNAME',
    accessKey: 'YOUR_ACCESS_KEY'
});
 
whm
    .api('version')
    .then(({ version }) => {
        console.log('WHM Version: %j', version);
    });
 
// or
whm
    .api({ action: 'listaccts' })
    .then(res => {
        console.log('Result: %j', res);
    });
 
whm
    .uapi('user')
    .api({ module: 'Email', func: 'list_pops' })
    .then(emails => {
        console.log(emails);
    });

Readme

Keywords

none

Package Sidebar

Install

npm i cpanel-rest-api

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

10.3 kB

Total Files

17

Last publish

Collaborators

  • claudenegm