1.0.0 • Published 5 years ago

node-uptime-robot v1.0.0

Weekly downloads
9
License
MIT
Repository
github
Last release
5 years ago

node-uptime-robot

A complete node.js wrapper for uptime robot API, with Promise!

Example

const UptimeRobot = require('node-uptime-robot'),
      bot = UptimeRobot.create('api-key')

bot.getMonitors(1, '1-7-30') // or UptimeRobot.mix(1, 7, 30)
.then((monitors) => console.log(monitors))
.catch((err) => console.log(err))

API

Every method returns a Promise with body as parameter as long as the Promise has been resolved. The body is by default the JSON string and can be automatically parsed into a JSON by passing true as second parameter into the UptimeRobot.create() method.

To append mulitple parameters like for a custom uptime ratios, use the UptimeRobot.mix() function. You can pass single values into it or array(s).

Enumerations

I've implemented every enumeration from their parameter api.

  • AlertContactType
  • AlertContactStatus
  • LogType
  • MonitorType
  • MonitorSubType
  • MonitorKeywordType
  • MonitorStatus
  • MWindowType
  • MWindowStatus
  • PSPSort
  • PSPStatus