OpenXchangeClient.Api.Tasks (open_xchange_client v0.10.1)

API calls for all endpoints tagged Tasks.

Link to this section Summary

Link to this section Functions

Link to this function

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

Confirms a task.

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • session (String.t): A session ID previously obtained from the login module.
  • id (String.t): Object ID of the task that shall be confirmed.
  • folder (String.t): Object ID of the folder who contains the tasks.
  • timestamp (integer()): Timestamp of the last update of the task.
  • body (TaskConfirmationBody): A JSON object with the fields confirmation and confirmmessage.
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

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

Creates a task.

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • session (String.t): A session ID previously obtained from the login module.
  • body (TaskData): A JSON object containing the task's data.
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

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

Deletes tasks.

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 deleted tasks.
  • body ([OpenXchangeClient.Model.TaskListElement.t]): A JSON array of JSON objects with the id and folder of the tasks.
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

get_all_tasks(connection, session, folder, columns, opts \\ [])

@spec get_all_tasks(Tesla.Env.client(), String.t(), String.t(), String.t(), keyword()) ::
  {:ok, OpenXchangeClient.Model.TasksResponse.t()} | {:error, Tesla.Env.t()}

Gets all tasks.

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • session (String.t): A session ID previously obtained from the login module.
  • folder (String.t): Object ID of the folder who contains the tasks.
  • columns (String.t): A comma-separated list of columns to return, like "1,200". Each column is specified by a numeric column identifier, see Common object data, Detailed task and appointment data and Detailed task data.
  • opts (KeywordList): [optional] Optional parameters
    • :sort (String.t): The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified.
    • :order (String.t): "asc" if the response entities should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.

returns

Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

get_task(connection, session, id, folder, opts \\ [])

@spec get_task(Tesla.Env.client(), String.t(), String.t(), String.t(), keyword()) ::
  {:ok, OpenXchangeClient.Model.TaskResponse.t()} | {:error, Tesla.Env.t()}

Gets a task.

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • session (String.t): A session ID previously obtained from the login module.
  • id (String.t): Object ID of the requested task.
  • folder (String.t): Object ID of the folder who contains the tasks.
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

get_task_list(connection, session, columns, body, opts \\ [])

Gets a list of tasks.

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,200". Each column is specified by a numeric column identifier, see Common object data, Detailed task and appointment data and Detailed task data.
  • body ([OpenXchangeClient.Model.TaskListElement.t]): A JSON array of JSON objects with the id and folder of the tasks.
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

get_task_updates(connection, session, folder, columns, timestamp, opts \\ [])

@spec get_task_updates(
  Tesla.Env.client(),
  String.t(),
  String.t(),
  String.t(),
  integer(),
  keyword()
) ::
  {:ok, OpenXchangeClient.Model.TaskUpdatesResponse.t()}
  | {:error, Tesla.Env.t()}

Gets the new, modified and deleted tasks.

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • session (String.t): A session ID previously obtained from the login module.
  • folder (String.t): Object ID of the folder who contains the tasks.
  • columns (String.t): A comma-separated list of columns to return, like "1,200". Each column is specified by a numeric column identifier, see Common object data, Detailed task and appointment data and Detailed task data.
  • timestamp (integer()): Timestamp of the last update of the requested tasks.
  • opts (KeywordList): [optional] Optional parameters
    • :ignore (String.t): Which kinds of updates should be ignored. Omit this parameter or set it to "deleted" to not have deleted tasks identifier in the response. Set this parameter to false and the response contains deleted tasks identifier.
    • :sort (String.t): The identifier of a column which determines the sort order of the response. If this parameter is specified, then the parameter order must be also specified.
    • :order (String.t): "asc" if the response entities should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.

returns

Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

search_tasks(connection, session, columns, body, opts \\ [])

Search for tasks.

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,200". Each column is specified by a numeric column identifier, see Common object data, Detailed task and appointment data and Detailed task data.
  • body (TaskSearchBody): A JSON object containing search parameters.
  • opts (KeywordList): [optional] Optional parameters
    • :sort (String.t): The identifier of a column which determines the sort order of the response. If this parameter is specified , then the parameter order must be also specified.
    • :order (String.t): "asc" if the response entires should be sorted in the ascending order, "desc" if the response entries should be sorted in the descending order. If this parameter is specified, then the parameter sort must be also specified.

returns

Returns

on success {:error, Tesla.Env.t} on failure

Link to this function

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

Updates a task.

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • session (String.t): A session ID previously obtained from the login module.
  • folder (String.t): Object ID of the folder who contains the tasks.
  • id (String.t): Object ID of the requested task.
  • timestamp (integer()): Timestamp of the last update of the requested tasks.
  • body (TaskData): A JSON object containing the task's data. Only modified fields are present.
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

on success {:error, Tesla.Env.t} on failure