NodePing.ContactGroups (NodePing Elixir v1.7.1) View Source

Manage contact groups on your NodePing account and subaccout.

https://nodeping.com/docs-api-contactgroups.html

Link to this section Summary

Functions

Create a contact group from your NodePing account or subaccount.

Create a contact group from your NodePing account or subaccount.

Delete a contact group from your NodePing account or subaccount.

Delete a contact group from your NodePing account or subaccount.

Get contact groups for your NodePing account or subaccount.

Get contact groups for your NodePing account or subaccount.

Get a contact group from your NodePing account or subaccount.

Get a contact group from your NodePing account or subaccount.

Update an existing contact group on your NodePing account or subaccount.

Update an existing contact group on your NodePing account or subaccount.

Link to this section Functions

Link to this function

create(token, opts, customerid \\ nil)

View Source

Create a contact group from your NodePing account or subaccount.

Parameters

  • token - NodePing API token that is provided with account
  • opts - Optional Map of parameters for new contact group
  • customerid - optional ID to access a subaccount

Opts

  • name - A label for the group
  • members - A list of contact ids

Examples

iex> token = System.fetch_env!("TOKEN")
iex> members = ["9GJ7EHJX", "GFRWVKD9"]
iex> opts = %{:name => "contactgroup name", :members => members}
iex> {:ok, result} = NodePing.ContactGroups.create(token, opts)
Link to this function

create!(token, opts, customerid \\ nil)

View Source

Create a contact group from your NodePing account or subaccount.

Parameters

  • token - NodePing API token that is provided with account
  • opts - Optional Map of parameters for new contact group
  • customerid - optional ID to access a subaccount

Opts

  • name - A label for the group
  • members - A list of contact ids

Examples

iex> token = System.fetch_env!("TOKEN")
iex> members = ["9GJ7EHJX", "GFRWVKD9"]
iex> opts = %{:name => "contactgroup name", :members => members}
iex> result = NodePing.ContactGroups.create!(token, opts)
Link to this function

delete(token, id, customerid \\ nil)

View Source

Delete a contact group from your NodePing account or subaccount.

Parameters

  • token - NodePing API token that is provided with account
  • id - the ID for your contact group
  • customerid - optional ID to access a subaccount

Examples

iex> token = System.fetch_env!("TOKEN")
iex> id = "201205050153W2Q4C-G-3QJWG"
iex> {:ok, result} = NodePing.ContactGroups.delete(token, id)
Link to this function

delete!(token, id, customerid \\ nil)

View Source

Delete a contact group from your NodePing account or subaccount.

Parameters

  • token - NodePing API token that is provided with account
  • id - the ID for your contact group
  • customerid - optional ID to access a subaccount

Examples

iex> token = System.fetch_env!("TOKEN")
iex> id = "201205050153W2Q4C-G-3QJWG"
iex> result = NodePing.ContactGroups.delete!(token, id)
Link to this function

get_all(token, customerid \\ nil)

View Source

Get contact groups for your NodePing account or subaccount.

Parameters

  • token - NodePing API token that is provided with account
  • customerid - optional ID to access a subaccount

Examples

iex> token = System.fetch_env!("TOKEN")
iex> {:ok, result} = NodePing.ContactGroups.get_all(token)
Link to this function

get_all!(token, customerid \\ nil)

View Source

Get contact groups for your NodePing account or subaccount.

Parameters

  • token - NodePing API token that is provided with account
  • customerid - optional ID to access a subaccount

Examples

iex> token = System.fetch_env!("TOKEN")
iex> result = NodePing.ContactGroups.get_all!(token)
Link to this function

get_by_id(token, id, customerid \\ nil)

View Source

Get a contact group from your NodePing account or subaccount.

Parameters

  • token - NodePing API token that is provided with account
  • id - the ID for your contact group
  • customerid - optional ID to access a subaccount

Examples

iex> token = System.fetch_env!("TOKEN")
iex> id = "201205050153W2Q4C-G-3QJWG"
iex> {:ok, result} = NodePing.ContactGroups.get_by_id(token, id)
Link to this function

get_by_id!(token, id, customerid \\ nil)

View Source

Get a contact group from your NodePing account or subaccount.

Parameters

  • token - NodePing API token that is provided with account
  • id - the ID for your contact group
  • customerid - optional ID to access a subaccount

Examples

iex> token = System.fetch_env!("TOKEN")
iex> id = "201205050153W2Q4C-G-3QJWG"
iex> result = NodePing.ContactGroups.get_by_id!(token, id)
Link to this function

update(token, id, opts, customerid \\ nil)

View Source

Update an existing contact group on your NodePing account or subaccount.

Parameters

  • token - NodePing API token that is provided with account
  • id - the ID for your contact group
  • opts - Optional Map of parameters for new contact group
  • customerid - optional ID to access a subaccount

Opts

  • name - A label for the group
  • members - A list of contact ids

Examples

iex> token = System.fetch_env!("TOKEN")
iex> id = "201205050153W2Q4C-G-3QJWG"
iex> members = ["9GJ7EHJX", "GFRWVKD9"]
iex> opts = %{:name => "contactgroup name", :members => members}
iex> {:ok, result} = NodePing.ContactGroups.update(token, id, opts)
Link to this function

update!(token, id, opts, customerid \\ nil)

View Source

Update an existing contact group on your NodePing account or subaccount.

Parameters

  • token - NodePing API token that is provided with account
  • id - the ID for your contact group
  • opts - Optional Map of parameters for new contact group
  • customerid - optional ID to access a subaccount

Opts

  • name - A label for the group
  • members - A list of contact ids

Examples

iex> token = System.fetch_env!("TOKEN")
iex> id = "201205050153W2Q4C-G-3QJWG"
iex> members = ["9GJ7EHJX", "GFRWVKD9"]
iex> opts = %{:name => "contactgroup name", :members => members}
iex> result = NodePing.ContactGroups.update!(token, id, opts)