0.0.2 • Published 4 years ago
maxihost-nodejs v0.0.2
maxihost-nodejs
Nodejs Package to use Maxihost API. Check our API documentation
Instalation
npm install maxihost-nodejs
Usage
const Maxihost = require('maxihost-nodejs');
maxihostApi = new Maxihost(<APITOKEN>);
// Async Await
const device = (async () => {
await maxihostApi.Device.list()
})
// Promise then
maxihostApi.Device.list().then((response) => {
// success
}, (response) => {
// failure
})
Available API Methods
Device.list
. SearchParams:limit, page, status
. ReferenceDevice.get
. Params:deviceId
. ReferenceDevice.create
. Params:facility, plan, hostname, operating_system, billing_cycle, ssh_keys, custom_scripts, raid
. ReferenceDevice.delete
. Params:deviceId
. ReferenceDevice.Bandwidth.get
. Params:deviceId
. SearchParams:output_format, period, start_time, end_time
. ReferenceDevice.Actions.manage_power
. Params:id, type
. ReferenceDevice.Actions.getReinstall
. Params:id
. ReferenceDevice.Actions.reinstall
. Params:id, label, operating_system, ssh
. ReferenceDevice.Actions.remote_access
. Params:id
. ReferenceDevice.Ips.list
. Params:page, limit
. ReferenceDevice.CustomScripts.list
. Params:page, limit
. ReferenceDevice.CustomScripts.update
. Params:id, name, content
. ReferenceDevice.CustomScripts.delete
. Params:id
. ReferenceDevice.CustomScripts.create
. Params:name, content
. ReferenceDevice.Plans.list
. Params:page, limit
. ReferenceDevice.Plans.addons
. Params:page, limit
. ReferenceDevice.Plans.operatingSystems
. Params:page, limit
. Reference
0.0.2
4 years ago