UptimeRobot
Uptime Robot API client for Ruby.
Installation
Add this line to your application's Gemfile:
gem 'uptimerobot'
And then execute:
$ bundle
Or install it yourself as:
$ gem install uptimerobot
Usage
require 'uptimerobot'
client = UptimeRobot::Client.new(apiKey: 'u956-afus321g565fghr519')
client.getMonitors
# => {"stat"=>"ok",
# "offset"=>"0",
# "limit"=>"50",
# "total"=>"2",
# "monitors"=>
# {"monitor"=>
# [{"id"=>"128795",
# "friendlyname"=>"Yahoo",
# "url"=>"http://www.yahoo.com/",
# "type"=>"1",
# "subtype"=>"",
# ...
client.newMonitor(
monitorFriendlyName: 'Google',
monitorURL: 'http://www.google.com',
monitorType: UptimeRobot::Monitor::Type::HTTP,
monitorAlertContacts: '448,716'
)
Test
$ bundle exec rake