NodePing.ContactGroups (NodePing Elixir v1.7.1) View Source
Manage contact groups on your NodePing account and subaccout.
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
Create a contact group from your NodePing account or subaccount.
Parameters
token
- NodePing API token that is provided with accountopts
- OptionalMap
of parameters for new contact groupcustomerid
- optional ID to access a subaccount
Opts
name
- A label for the groupmembers
- 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)
Create a contact group from your NodePing account or subaccount.
Parameters
token
- NodePing API token that is provided with accountopts
- OptionalMap
of parameters for new contact groupcustomerid
- optional ID to access a subaccount
Opts
name
- A label for the groupmembers
- 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)
Delete a contact group from your NodePing account or subaccount.
Parameters
token
- NodePing API token that is provided with accountid
- the ID for your contact groupcustomerid
- 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)
Delete a contact group from your NodePing account or subaccount.
Parameters
token
- NodePing API token that is provided with accountid
- the ID for your contact groupcustomerid
- 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)
Get contact groups for your NodePing account or subaccount.
Parameters
token
- NodePing API token that is provided with accountcustomerid
- optional ID to access a subaccount
Examples
iex> token = System.fetch_env!("TOKEN")
iex> {:ok, result} = NodePing.ContactGroups.get_all(token)
Get contact groups for your NodePing account or subaccount.
Parameters
token
- NodePing API token that is provided with accountcustomerid
- optional ID to access a subaccount
Examples
iex> token = System.fetch_env!("TOKEN")
iex> result = NodePing.ContactGroups.get_all!(token)
Get a contact group from your NodePing account or subaccount.
Parameters
token
- NodePing API token that is provided with accountid
- the ID for your contact groupcustomerid
- 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)
Get a contact group from your NodePing account or subaccount.
Parameters
token
- NodePing API token that is provided with accountid
- the ID for your contact groupcustomerid
- 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)
Update an existing contact group on your NodePing account or subaccount.
Parameters
token
- NodePing API token that is provided with accountid
- the ID for your contact groupopts
- OptionalMap
of parameters for new contact groupcustomerid
- optional ID to access a subaccount
Opts
name
- A label for the groupmembers
- 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)
Update an existing contact group on your NodePing account or subaccount.
Parameters
token
- NodePing API token that is provided with accountid
- the ID for your contact groupopts
- OptionalMap
of parameters for new contact groupcustomerid
- optional ID to access a subaccount
Opts
name
- A label for the groupmembers
- 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)