0.0.2 • Published 4 years ago

maxihost-nodejs v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

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. Reference
  • Device.get. Params: deviceId. Reference
  • Device.create. Params: facility, plan, hostname, operating_system, billing_cycle, ssh_keys, custom_scripts, raid. Reference
  • Device.delete. Params: deviceId. Reference
  • Device.Bandwidth.get. Params: deviceId. SearchParams: output_format, period, start_time, end_time. Reference
  • Device.Actions.manage_power. Params: id, type. Reference
  • Device.Actions.getReinstall. Params: id. Reference
  • Device.Actions.reinstall. Params: id, label, operating_system, ssh. Reference
  • Device.Actions.remote_access. Params: id. Reference
  • Device.Ips.list. Params: page, limit. Reference
  • Device.CustomScripts.list. Params: page, limit. Reference
  • Device.CustomScripts.update. Params: id, name, content. Reference
  • Device.CustomScripts.delete. Params: id. Reference
  • Device.CustomScripts.create. Params: name, content. Reference
  • Device.Plans.list. Params: page, limit. Reference
  • Device.Plans.addons. Params: page, limit. Reference
  • Device.Plans.operatingSystems. Params: page, limit. Reference
0.0.2

4 years ago