OpenXchangeClient.Api.Groups (open_xchange_client v0.10.1)
API calls for all endpoints tagged Groups
.
Link to this section Summary
Functions
Creates a group.
Deletes a group.
Gets all groups.
Gets a group.
Gets a list of groups.
Gets the new, modified and deleted groups.
Searches for groups.
Updates a group.
Link to this section Functions
create_group(connection, session, body, opts \\ [])
@spec create_group( Tesla.Env.client(), String.t(), OpenXchangeClient.Model.GroupData.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.GroupUpdateResponse.t()} | {:error, Tesla.Env.t()}
Creates a group.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- body (GroupData): A JSON object containing the group data. The field id is not present.
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
delete_group(connection, session, timestamp, body, opts \\ [])
@spec delete_group( Tesla.Env.client(), String.t(), integer(), OpenXchangeClient.Model.GroupListElement.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.GroupsResponse.t()} | {:error, Tesla.Env.t()}
Deletes a group.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- timestamp (integer()): Timestamp of the last update of the group to delete.
- body (GroupListElement): A JSON object with the field
id
containing the unique identifier of the group. - opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_all_groups(connection, session, columns, opts \\ [])
@spec get_all_groups(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, OpenXchangeClient.Model.GroupsResponse.t()} | {:error, Tesla.Env.t()}
Gets all groups.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- columns (String.t): A comma-separated list of columns to return, like "1,700". Each column is specified by a numeric column identifier, see Group data.
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_group(connection, session, id, opts \\ [])
@spec get_group(Tesla.Env.client(), String.t(), integer(), keyword()) :: {:ok, OpenXchangeClient.Model.GroupResponse.t()} | {:error, Tesla.Env.t()}
Gets a group.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- id (integer()): The ID of the group.
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_group_list(connection, session, body, opts \\ [])
@spec get_group_list( Tesla.Env.client(), String.t(), [OpenXchangeClient.Model.GroupListElement.t()], keyword() ) :: {:ok, OpenXchangeClient.Model.GroupsResponse.t()} | {:error, Tesla.Env.t()}
Gets a list of groups.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- body ([OpenXchangeClient.Model.GroupListElement.t]): A JSON array of JSON objects with the id of the requested groups.
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
get_group_updates(connection, session, timestamp, opts \\ [])
@spec get_group_updates(Tesla.Env.client(), String.t(), integer(), keyword()) :: {:ok, OpenXchangeClient.Model.GroupUpdatesResponse.t()} | {:error, Tesla.Env.t()}
Gets the new, modified and deleted groups.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- timestamp (integer()): Timestamp of the last update of the requested groups.
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
search_groups(connection, session, body, opts \\ [])
@spec search_groups( Tesla.Env.client(), String.t(), OpenXchangeClient.Model.GroupSearchBody.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.GroupsResponse.t()} | {:error, Tesla.Env.t()}
Searches for groups.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- body (GroupSearchBody): A JSON object with the search parameters.
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure
update_group(connection, session, id, timestamp, body, opts \\ [])
@spec update_group( Tesla.Env.client(), String.t(), integer(), integer(), OpenXchangeClient.Model.GroupData.t(), keyword() ) :: {:ok, OpenXchangeClient.Model.CommonResponse.t()} | {:error, Tesla.Env.t()}
Updates a group.
parameters
Parameters
- connection (OpenXchangeClient.Connection): Connection to server
- session (String.t): A session ID previously obtained from the login module.
- id (integer()): ID of the group that shall be updated.
- timestamp (integer()): Timestamp of the last update of the group to update. If the group was modified after the specified timestamp, then the update must fail.
- body (GroupData): A JSON object containing the group data fields to change. Only modified fields are present and the field id is omitted.
- opts (KeywordList): [optional] Optional parameters
returns
Returns
on success {:error, Tesla.Env.t} on failure