cpanel-lib
Node.js library for the cPanel/WHM API
Last updated 2 years ago by vially .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install cpanel-lib 
SYNC missed versions from official npm registry.

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)

Current Tags

  • 0.0.5                                ...           latest (2 years ago)

5 Versions

  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           4 years ago
  • 0.0.3                                ...           8 years ago
  • 0.0.2                                ...           8 years ago
  • 0.0.1                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 10
Dependencies (1)
  • qs >= 0.3.2
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |