https://github.com/plesk/api-node-client
Plesk XML-RPC API Client for Node.js
https://github.com/plesk/api-node-client
Last synced: 4 months ago
JSON representation
Plesk XML-RPC API Client for Node.js
- Host: GitHub
- URL: https://github.com/plesk/api-node-client
- Owner: plesk
- License: other
- Created: 2016-06-23T16:29:37.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-08T16:02:27.000Z (over 9 years ago)
- Last Synced: 2025-10-11T09:31:06.783Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 3
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Plesk XML-RPC API Client for Node.js
## Installation
```
npm install --save plesk-api-client
```
## Usage
Basic usage:
```javascript
const pleskApi = require('plesk-api-client');
...
request =
`
`;
...
const client = new pleskApi.Client(host);
client.setCredentials(login, password);
client.request(request, (response) => {
...
});
```
Usage with promise:
```javascript
...
client.request(request)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.log(error);
});
```
Usage with self-signed certificates on 8443 port:
```javascript
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0;
...
client.request(...
```