0.2.3-alpha • Published 9 years ago
cpanel-api
Licence
MIT
Version
0.2.3-alpha
Deps
3
Vulns
0
Weekly
0
About
cpanel-api exposes a single class, cPanel, that acts as a client, aware of differing cPanel api versions, and providing type-safe interfaces for standard methods.
Use
Load the module and instantiate the cPanel class, using the server hostname, cpanel user, and cpanel password.
const cPanel = require('cpanel-api').cPanel
let cpanel = new cPanel({
host: 'somehostname.com',
user: 'root',
pass: 'myfakepass'
})
To call a cpanel api function, use the API method of the client:
cpanel.API('Email', 'add_pop', {
// method parameters here
}, (err, res) => {
// callback here
})
Implemented Methods
addpopadd_popadd_mxadd_forwarder
AddonDomain
addaddondomain
WHM
createacct
Contributing
To request a module/method, send an email to npm@jamesonaranda.com. If you would like to add a missing method, please make a pull request on github