View Source PlacetelAPI.Api.Groups (placetel_api v2.0.1)
API calls for all endpoints tagged Groups.
Link to this section Summary
Functions
Delete a group Delete a group by its ID
Fetch all groups Fetch a list of all groups
Fetch a group Fetch a groups by its ID
Create a group Create a new group
Update a group Update a group by its ID
Link to this section Functions
@spec delete_groups_id(Tesla.Env.client(), integer(), keyword()) :: {:ok, PlacetelAPI.Model.Group.t()} | {:error, Tesla.Env.t()}
Delete a group Delete a group by its ID
parameters
Parameters
connection(PlacetelAPI.Connection): Connection to serverid(integer()): Group IDopts(keyword): Optional parameters
returns
Returns
{:ok, PlacetelAPI.Model.Group.t}on success{:error, Tesla.Env.t}on failure
@spec get_groups( Tesla.Env.client(), keyword() ) :: {:ok, [PlacetelAPI.Model.Group.t()]} | {:error, Tesla.Env.t()}
Fetch all groups Fetch a list of all groups
parameters
Parameters
connection(PlacetelAPI.Connection): Connection to serveropts(keyword): Optional parameters:"filter[name]"(String.t)::"filter[description]"(String.t)::"filter[type]"(String.t)::page(integer()): Page of results to fetch.:per_page(integer()): Number of results to return per page.
returns
Returns
{:ok, [%Group{}, ...]}on success{:error, Tesla.Env.t}on failure
@spec get_groups_id(Tesla.Env.client(), integer(), keyword()) :: {:ok, PlacetelAPI.Model.Group.t()} | {:error, Tesla.Env.t()}
Fetch a group Fetch a groups by its ID
parameters
Parameters
connection(PlacetelAPI.Connection): Connection to serverid(integer()): Group IDopts(keyword): Optional parameters
returns
Returns
{:ok, PlacetelAPI.Model.Group.t}on success{:error, Tesla.Env.t}on failure
@spec post_groups(Tesla.Env.client(), PlacetelAPI.Model.PostGroups.t(), keyword()) :: {:ok, PlacetelAPI.Model.Group.t()} | {:error, Tesla.Env.t()}
Create a group Create a new group
parameters
Parameters
connection(PlacetelAPI.Connection): Connection to servergroups(PostGroups):opts(keyword): Optional parameters
returns
Returns
{:ok, PlacetelAPI.Model.Group.t}on success{:error, Tesla.Env.t}on failure
@spec put_groups_id( Tesla.Env.client(), integer(), PlacetelAPI.Model.PutGroups.t(), keyword() ) :: {:ok, PlacetelAPI.Model.Group.t()} | {:error, Tesla.Env.t()}
Update a group Update a group by its ID
parameters
Parameters
connection(PlacetelAPI.Connection): Connection to serverid(integer()): Group IDgroups(PutGroups):opts(keyword): Optional parameters
returns
Returns
{:ok, PlacetelAPI.Model.Group.t}on success{:error, Tesla.Env.t}on failure