aboutsummaryrefslogtreecommitdiff
path: root/lib/exdatadog/monitors.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/exdatadog/monitors.ex')
-rw-r--r--lib/exdatadog/monitors.ex23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/exdatadog/monitors.ex b/lib/exdatadog/monitors.ex
new file mode 100644
index 0000000..9d271be
--- /dev/null
+++ b/lib/exdatadog/monitors.ex
@@ -0,0 +1,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