connorjacobsen / pagex

Elixir client for the Pagerduty API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pagex

Hex.pm API Docs Build Status

Elixir client for V2 of the Pagerduty REST API.

Installation

If available in Hex, the package can be installed by adding pagex to your list of dependencies in mix.exs:

def deps do
  [
    {:pagex, "~> 0.1.0"}
  ]
end

Usage

Configuration pagex for your application is simple, you only need to pass in your API Key and the Pagerduty base URI.

config :pagex,
  api_key: "SOME-API-KEY",
  uri: "https://api.pagerduty.com"

Configurable URIs are useful for testing.

You can also use the {:system, "ENV_VAR_NAME"} pattern to force pagex to lookup the value from the environment at run time.

config :pagex,
  api_key: {:system, "PAGERDUTY_API_KEY"},
  uri: {:system, "PAGERDUTY_URI"}

Creating an incident is simple:

iex> Pagex.Incidents.create("Test Incident!", "MyServiceID", "me@example.org)

About

Elixir client for the Pagerduty API

License:MIT License


Languages

Language:Elixir 100.0%