# cpanel-api

> A Node.js client for cPanel

Latest version **0.2.3-alpha** (published 2017-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install cpanel-api
pnpm add cpanel-api
yarn add cpanel-api
bun add cpanel-api
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.3-alpha |
| Published | 2017-08-28 |
| First published | 2017-08-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | jamesona |

## Links

- npm: https://www.npmjs.com/package/cpanel-api
- npm.io page: https://npm.io/package/cpanel-api

## Dependencies (3)

- [qs](https://npm.io/package/qs.md) latest
- [request](https://npm.io/package/request.md) latest
- [typescript](https://npm.io/package/typescript.md) >= 2.3

## Recent versions

- 0.2.3-alpha (latest) — 2017-08-28
- 0.2.2-alpha — 2017-08-28
- 0.2.1-alpha — 2017-08-28
- 0.2.0-alpha — 2017-08-28

## README

## 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
### Email
- `addpop`
- `add_pop`
- `add_mx`
- `add_forwarder`
### AddonDomain
- `addaddondomain`
### WHM
- `createacct`

## Contributing
To request a module/method, send an email to [npm@jamesonaranda.com](mailto:npm@jamesonaranda.com).
If you would like to add a missing method, please make a pull request on [github](https://github.com/jamesona/cpanel-api)

---
_Source: https://npm.io/package/cpanel-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
