2.0.0 • Published 1 year ago

zyhm v2.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

zyhm

This is a library that allows you to remotely control your web hosting server that is running cPanel for personal or bot use. Recoded and fixing outlog from : @ihadeed/node-whm

Instalation

npm i zyhm

Usage JavaScript

var ZYHM = require('zyhm');
var ZYHMClient = new ZYHM.Client({
    serverUrl: 'https://myserver.com:2087',
    remoteAccessKey: 'remoteAccessKeyHere',
    username: 'resellerOrRootUser'
});

ZYHMClient.createAccount({
    username: 'myuser',
    password: 'mySecurePassword!',
    plan: 'Pro',
    domain: 'clientdomain.com'
}).then(
    function(success){ 
        console.log(success);
        // do something with data
    },
    function(error) {
        console.error(error);
        // do something with data
    }
);

Usage Typescript

import { Client, ZYHMOptions } from 'zyhm';

const ZYHMClientOptions: ZYHMOptions = {
   serverUrl: 'https://myserver.com:2087',
   remoteAccessKey: 'remoteAccessKeyHere',
   username: 'resellerOrRootUser'
};

const client: Client = new Client(ZYHMClientOptions);

client.createAccount({
           username: 'myuser',
           password: 'mySecurePassword!',
           plan: 'Pro',
           domain: 'clientdomain.com'
       }).then(
           success => { 
               console.log(success);
               // do something with data
           },
           error => {
               console.error(error);
               // do something with data
           }
       );

Methods Calling Function

createAccount(options: CreateAccountOptions): Promise<any>

terminateAccount(user: string): Promise<any>

listAccounts(): Promise<AccountData[]>

listIPAddresses(): Promise<any>

Interfaces TypeScript

WHMOoptions

CreateAccountOptions

AccountData

2.0.0

1 year ago

1.9.0

1 year ago

1.8.0

1 year ago

1.7.0

1 year ago

1.6.0

1 year ago

1.5.0

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago