Beget wrapper for NodeJS. BegetAPI will allow to use most features of the administration panel directly from your own scripts, content management systems (CMS) and other software products.
See documentation on endpoints in details
const { Beget } = require('node-beget');
// import { Beget } from 'node-beget';
const begetConfig = { login: 'login', password: 'password' };
const beget = new Beget(begetConfig);
// ...
// get account info
const accountInfo = await beget.user.getAccountInfo();
// toggle ssh
await beget.user.toggleSsh({ status: 1 });
await beget.mysql.dropAccess({ suffix: 'suffix', access: 'localhost' });
const { UserEndpoint, BegetRequest } = require('node-beget');
// import { UserEndpoint, BegetRequest } from 'node-beget';
const begetConfig = { login: 'login', password: 'password' };
const begetClient = new BegetRequest(begetConfig);
const user = new UserEndpoint(begetClient);
// ...
await user.getAccountInfo();
Generated using TypeDoc