NodePing.Notificationprofiles.create

You're seeing just the function create, go back to NodePing.Notificationprofiles module for more information.
Link to this function

create(token, name, notifications)

View Source

Specs

create(token :: bitstring(), name :: bitstring(), notifications :: list()) ::
  tuple()

Create a notification profile for the account

Parameters

  • token - NodePing API token that is provided with account
  • name - Name for the notification profile
  • notifications - list of maps containing the contact or group id, delay, and scheduling for notifications

Examples

iex> token = System.fetch_env!("TOKEN")
iex> notifications = [
   >   %{"contactkey1" => %{"delay" => 0, "schedule" => "schedule1"}},
   >   %{"contactkey2" => %{"delay" => 0, "schedule" => "schedule1"}},
   > ]
iex> {:ok, result} = NodePing.Notificationprofiles.create(token, "profilename", notifications)
Link to this function

create(token, name, notifications, customerid)

View Source

Specs

create(
  token :: bitstring(),
  name :: bitstring(),
  notifications :: list(),
  customerid :: bitstring()
) :: tuple()

Create a notification profile for the account

Parameters

  • token - NodePing API token that is provided with account
  • name - Name for the notification profile
  • notifications - list of maps containing the contact or group id, delay, and scheduling for notifications
  • customerid - optional ID to access a subaccount

Examples

iex> token = System.fetch_env!("TOKEN")
iex> customerid = System.fetch_env!("CUSTOMERID")
iex> notifications = [
   >   %{"contactkey1" => %{"delay" => 0, "schedule" => "schedule1"}},
   >   %{"contactkey2" => %{"delay" => 0, "schedule" => "schedule1"}},
   > ]
iex> {:ok, result} = NodePing.Notificationprofiles.create(token, "profilename", notifications, customerid)