Updown
A wrapper for the Updown.io API
Installation
Add this line to your application's Gemfile:
gem 'updown'
And then execute:
$ bundle
Or install it yourself as:
$ gem install updown
Configuration
Set your API key
# config/initializers/updown.rb
Updown.configure do |config|
config.api_key = 'your_api_key'
end
# or
Updown.configuration.api_key = 'your_api_key'
Or set the UPDOWN_API_KEY environment variable
Usage
List all your checks:
Updown::Check.all
See downtimes for a specific check:
check.downtimes
Create a new check:
Updown::Check.create 'https://google.com'
You can also set period and published:
Updown::Check.create 'https://google.com', period: 30, published: true
Update a specific check:
check.update period: 30
See more details about the options here: https://updown.io/api
Delete a specific check:
check.destroy
Contributing
- Fork it ( https://github.com/[my-github-username]/updown/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request