Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/itchyny/mackerel-client-hs

Mackerel API client in Haskell
https://github.com/itchyny/mackerel-client-hs

api-client haskell haskell-library mackerel mackerel-client

Last synced: 28 days ago
JSON representation

Mackerel API client in Haskell

Awesome Lists containing this project

README

        

# mackerel-client-hs
An API client library for [Mackerel](https://mackerel.io).

API documents: [Mackerel API Documents (v0)](https://mackerel.io/api-docs/)

The official Go client library: [mackerel-client-go](https://github.com/mackerelio/mackerel-client-go)

## Example
```haskell
import Data.Default
import Web.Mackerel

main :: IO ()
main = do
let client = def { apiKey = "" }

print =<< getOrganization client
print =<< listUsers client

print =<< listHosts client def { listHostsParamsService = Just "servicename", listHostsParamsRoles = ["role1", "role2"] }

print =<< listMonitors client
print =<< updateMonitor client monitor { monitorName = "Monitor name renamed" }
print =<< deleteMonitor client (MonitorId "")

print =<< listAlerts client
print =<< closeAlert client (AlertId "") "this is not an important alert"
```

## Author
itchyny

## License
This software is released under the MIT License, see LICENSE.