/mixduty

An elixir client for PagerDuty's API v2

Primary LanguageElixirMIT LicenseMIT

Deprecation Notice

This package is no longer maintained and we do not recommend using it.


Mixduty

A simple elixir client for the PagerDuty v2 API.

Full Documentation

Installation

Install by adding mixduty to your list of dependencies in mix.exs:

def deps do
  [
    {:mixduty, "~> 0.1.1"}
  ]
end
$ mix deps.get

Example Usage

Initialize a new client with a valid auth token:

$ iex -S mix
iex(1)> client = Mixduty.Client.new("MY_TOKEN")
%Mixduty.Client{
  headers: [
    {"Accept", "application/vnd.pagerduty+json;version=2"},
    {"Authorization", "Token token=y_NbAkKc66ryYTWUXYEu"},
    {"Content-type", "application/json"}
  ]
}

Pass client to function calls described in documentation:

iex(2)> Mixduty.Users.list(client)

Configuration

The following configuration options are available:

config :mixduty,
  base_url: "https://api.pagerduty.com/"

License

MIT

Contributing

  1. Fork it ( https://github.com/PagerDuty/mixduty/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request