Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juhalehtonen/ex_uptimerobot
Small Elixir wrapper for Uptime Robot API
https://github.com/juhalehtonen/ex_uptimerobot
elixir-wrapper uptimerobot-api
Last synced: about 2 months ago
JSON representation
Small Elixir wrapper for Uptime Robot API
- Host: GitHub
- URL: https://github.com/juhalehtonen/ex_uptimerobot
- Owner: juhalehtonen
- License: mit
- Created: 2017-04-29T11:29:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-09T10:59:09.000Z (about 7 years ago)
- Last Synced: 2024-08-10T04:20:01.528Z (5 months ago)
- Topics: elixir-wrapper, uptimerobot-api
- Language: Elixir
- Homepage:
- Size: 65.4 KB
- Stars: 3
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ExUptimerobot
[![Build Status](https://travis-ci.org/juhalehtonen/ex_uptimerobot.svg?branch=master)](https://travis-ci.org/juhalehtonen/ex_uptimerobot)
A simple Elixir wrapper for the https://uptimerobot.com/ API (v2) service.
To use this library, see both [the official API documentation](https://uptimerobot.com/api) as well as the [ex_uptimerobot docs on Hexdocs](https://hexdocs.pm/ex_uptimerobot/api-reference.html).
## Installation
1. Add `ex_uptimerobot` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:ex_uptimerobot, "~> 0.4.0"}]
end
```2. Run `mix deps.get`
3. Configure with your Uptime Robot API key, either via:
```elixir
config :ex_uptimerobot, :api_key, "your-uptimerobot-api-key"
```or by setting the `EXUPTIMEROBOT_API_KEY` system environment variable.
## Using ExUptimerobot
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()`## Documentation
Docs can be found at [https://hexdocs.pm/ex_uptimerobot](https://hexdocs.pm/ex_uptimerobot).
## Testing
- ExUnit: `mix test`
- Dialyzer: `mix dialyzer`
- Coveralls: `mix coveralls`
- Credo: `mix credo --strict`## License
Made available under the MIT license. See [LICENSE](LICENSE.md) for more details.