aboutsummaryrefslogtreecommitdiff
path: root/lib/exdatadog/monitors.ex
blob: 9d271bee5a95d795e022ded69c8b87b94c413b6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
defmodule Exdatadog.Monitors do
  @moduledoc """
  Module for interacting with Datadog Monitors
  """

  import Exdatadog

  @doc """
  Request the details of a monitor
  """
  @spec details(integer, List.t, Exdatadog.Client.t) :: Exdatadog.response
  def details(id, group_states \\ [], client)
  def details(id, [], client) do
    get("api/v1/monitor/#{id}", client)
  end
  def details(id, group_states, client) do
    get("api/v1/monitor/#{id}",
        client,
        group_states: Enum.join(group_states, ","))
  end


end