A small Elixir wrapper for the https://uptimerobot.com/ API (v2) service.
Note that this library is still under construction and in major version zero, and thus not all functionality offered by the Uptime Robot API is yet present. See the docs at https://hexdocs.pm/ex_uptimerobot to see what's available at this time.
- Add
ex_uptimerobot
to your list of dependencies inmix.exs
:
def deps do
[{:ex_uptimerobot, "~> 0.3.1"}]
end
- Run
mix deps.get
Configure with your Uptime Robot API key, either via:
config :ex_uptimerobot, :api_key, "your-uptimerobot-api-key"
or by setting the EXUPTIMEROBOT_API_KEY
system environment variable.
Example usage:
- Get all monitors:
ExUptimerobot.Monitor.get_monitors()
- Add a new monitor:
ExUptimerobot.Monitor.new_monitor([friendly_name: "Elixir Lang", url: "http://elixir-lang.org/", type: 1])
- Get account details:
ExUptimerobot.Account.get_account_details()
- Get all alert contacts:
ExUptimerobot.AlertContact.get_alert_contacts()
Docs can be found at https://hexdocs.pm/ex_uptimerobot.
- ExUnit:
mix test
- Dialyzer:
mix dialyzer
- Coveralls:
mix coveralls
- Credo:
mix credo --strict
Made available under the MIT license. See LICENSE for more details.