OpenXchangeClient.Api.Calendar (open_xchange_client v0.10.0)

API calls for all endpoints tagged Calendar.

Link to this section Summary

Functions

Requests whether there are appointments on days in a specified time range.

Resolves the UID to an OX object ID.

Link to this section Functions

Link to this function

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

Confirms an appointment.

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 appointment that shall be confirmed.
  • folder (String.t): Object ID of the folder who contains the appointments.
  • timestamp (integer()): Timestamp of the last update of the appointment.
  • body (AppointmentConfirmationBody): A JSON object with the fields confirmation, confirmmessage and optionally id.
  • opts (KeywordList): [optional] Optional parameters
    • :occurrence (integer()): The numeric identifier of the occurrence to which the confirmation applies (in case id denotes a series appointment).

returns

Returns

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

Link to this function

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

Creates an appointment.

parameters

Parameters

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

returns

Returns

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

Link to this function

create_appointment_0(connection, session, id, ignore_conflicts, folder, timezone, body, opts \\ [])

Creates an appointment.

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 appointment.
  • ignore_conflicts (boolean()): Flag indicating whether conflicts should be ignored or not.
  • folder (String.t): Object ID of the folder who contains the appointments.
  • timezone (String.t): The timezone which should be used
  • body (InlineObject):
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

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

Link to this function

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

Deletes appointments.

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 appointments.
  • body ([OpenXchangeClient.Model.AppointmentDeletionsElement.t]): A JSON array of JSON objects with the id, folder and optionally the recurrence position (if present in an appointment to fully identify it) of the appointments.
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

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

Link to this function

get_all_appointments(connection, session, columns, start_date, end_date, opts \\ [])

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

Gets all appointments.

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,500". Each column is specified by a numeric column identifier, see Common object data, Detailed task and appointment data and Detailed appointment data.
  • start_date (integer()): Lower inclusive limit of the queried range as a Date. Only appointments which start on or after this date are returned.
  • end_date (integer()): Upper exclusive limit of the queried range as a Date. Only appointments which end before this date are returned.
  • opts (KeywordList): [optional] Optional parameters
    • :folder (String.t): Object ID of the folder, whose contents are queried. If not specified, defaults to all calendar folders.
    • :recurrence_master (boolean()): Extract the recurrence to several appointments. The default value is false so every appointment of the recurrence will be calculated.

returns

Returns

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

Link to this function

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

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

Gets an appointment.

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 appointment.
  • folder (String.t): Object ID of the folder who contains the appointments.
  • opts (KeywordList): [optional] Optional parameters
    • :recurrence_position (integer()): Recurrence position of requested appointment.

returns

Returns

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

Link to this function

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

Gets a list of appointments.

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,500". Each column is specified by a numeric column identifier, see Common object data, Detailed task and appointment data and Detailed appointment data.
  • body ([OpenXchangeClient.Model.AppointmentListElement.t]): A JSON array of JSON objects with the id, folder and optionally either recurrence_position or recurrence_date_position of the requested appointments.
  • opts (KeywordList): [optional] Optional parameters
    • :recurrence_master (boolean()): Extract the recurrence to several appointments. The default value is false so every appointment of the recurrence will be calculated.

returns

Returns

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

Link to this function

get_appointment_updates(connection, session, columns, timestamp, opts \\ [])

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

Gets updated appointments.

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,500". Each column is specified by a numeric column identifier, see Common object data, Detailed task and appointment data and Detailed appointment data.
  • timestamp (integer()): Timestamp of the last update of the requested appointments.
  • opts (KeywordList): [optional] Optional parameters
    • :folder (String.t): Object ID of the folder, whose contents are queried. That parameter may be absent in case ignore is set to "deleted", which means all accessible calendar folders are considered. If ignore is not set to "deleted", that parameter is mandatory.
    • :start (integer()): Lower inclusive limit of the queried range as a Date. Only appointments which end on or after this date are returned. This parameter is optional in case a certain folder is queried, but mandatory if all accessible calendar folders are supposed to be considered (folder not specified).
    • :end (integer()): Upper exclusive limit of the queried range as a Date. Only appointments which start before this date are returned. This parameter is optional in case a certain folder is queried, but mandatory if all accessible calendar folders are supposed to be considered (folder not specified).
    • :ignore (String.t): Which kinds of updates should be ignored. Currently, the only valid value – "deleted" – causes deleted object IDs not to be returned.
    • :recurrence_master (boolean()): Extract the recurrence to several appointments. The default value is false so every appointment of the recurrence will be calculated.

returns

Returns

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

Link to this function

get_change_exceptions(connection, session, id, folder, columns, opts \\ [])

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

Gets all change exceptions.

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 appointment series.
  • folder (String.t): Object ID of the folder who contains the appointments.
  • columns (String.t): A comma-separated list of columns to return, like "1,500". Each column is specified by a numeric column identifier, see Common object data, Detailed task and appointment data and Detailed appointment data.
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

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

Link to this function

get_free_and_busy(connection, session, id, start_date, end_date, type, opts \\ [])

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

Gets appointments between a specified time range.

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • session (String.t): A session ID previously obtained from the login module.
  • id (integer()): Internal user id. Must be obtained from the contact module.
  • start_date (integer()): Lower inclusive limit of the queried range as a Date. Only appointments which end on or after this date are returned.
  • end_date (integer()): Upper exclusive limit of the queried range as a Date. Only appointments which start before this date are returned.
  • type (integer()): Constant for user or resource (1 for users, 3 for resources).
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

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

Link to this function

get_new_appointments(connection, session, columns, start_date, end_date, limit, opts \\ [])

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

Gets new appointments.

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,500". Each column is specified by a numeric column identifier, see Common object data, Detailed task and appointment data and Detailed appointment data.
  • start_date (integer()): Lower inclusive limit of the queried range as a Date. Only appointments which end on or after this date are returned.
  • end_date (integer()): Upper exclusive limit of the queried range as a Date. Only appointments which start before this date are returned.
  • limit (String.t): Limits the number of returned objects to the given value.
  • 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 and holds a column number, 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

has_appointments_on_days(connection, session, start_date, end_date, opts \\ [])

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

Requests whether there are appointments on days in a specified time range.

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • session (String.t): A session ID previously obtained from the login module.
  • start_date (integer()): Lower inclusive limit of the queried range as a Date. Only appointments which start on or after this date are returned.
  • end_date (integer()): Upper exclusive limit of the queried range as a Date. Only appointments which end before this date are returned.
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

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

Link to this function

resolve_uid(connection, session, uid, opts \\ [])

Resolves the UID to an OX object ID.

parameters

Parameters

  • connection (OpenXchangeClient.Connection): Connection to server
  • session (String.t): A session ID previously obtained from the login module.
  • uid (String.t): The UID that shall be resolved.
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

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

Link to this function

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

Searches for appointments.

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,500". Each column is specified by a numeric column identifier, see Common object data, Detailed task and appointment data and Detailed appointment data.
  • body (AppointmentSearchBody): A JSON object containing search parameters.
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

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

Link to this function

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

Updates an appointment.

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 appointment.
  • folder (String.t): Object ID of the folder who contains the appointments.
  • timestamp (integer()): Timestamp of the updated appointment. If the appointment was modified after the specified timestamp, then the update must fail.
  • body (AppointmentData): A JSON object containing the appointment's data. The field recurrence_id is always present if it is present in the original appointment. The field recurrence_position is present if it is present in the original appointment and only this single appointment should be modified. The field id is not present because it is already included as a parameter. Other fields are present only if modified.
  • opts (KeywordList): [optional] Optional parameters

returns

Returns

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