GitXplorerGitXplorer
v

cpanel-lib

public
40 stars
23 forks
0 issues

Commits

List of commits on branch master.
Verified
0499c698be4da037f2ae908143c4814eea3864df

Release v0.0.5

vvially committed 8 years ago
Unverified
a9e9ebbe62e950a6773732afbdc74cb0f24aed61

Merge pull request #8 from alfredogt/patch-3

vvially committed 8 years ago
Unverified
58e34847dbed70c334029101e4a2d184615beed6

Update cpanel.js

aalfredogt committed 8 years ago
Unverified
a1d61dac4be82abc91c03a1b5ed8120fa1cd742a

Merge pull request #6 from alfredogt/patch-2

vvially committed 8 years ago
Unverified
c02daf64b01407ed1b51b751fae402805e2d4d8a

Merge pull request #7 from alfredogt/patch-1

vvially committed 8 years ago
Unverified
f74cc11ca8c595572a0f741ffd4ca8de84b01317

add line call UAPI

aalfredogt committed 8 years ago

README

The README file for this repository.

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)