OpenXchangeClient.Api.Groups (open_xchange_client v0.10.0)

API calls for all endpoints tagged Groups.

Link to this section Summary

Link to this section Functions

Link to this function

create_group(connection, session, body, opts \\ [])

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

Link to this function

delete_group(connection, session, timestamp, body, opts \\ [])

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

Link to this function

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

Link to this function

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

Link to this function

get_group_list(connection, session, body, opts \\ [])

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

Link to this function

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

Link to this function

search_groups(connection, session, body, opts \\ [])

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

Link to this function

update_group(connection, session, id, timestamp, body, opts \\ [])

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