Free busy

class gcsa.free_busy.FreeBusy(*, time_min, time_max, groups, calendars, groups_errors=None, calendars_errors=None)

Represents free/busy information for a given calendar(s) and/or group(s)

Parameters:
  • time_min (datetime) – The start of the interval.

  • time_max (datetime) – The end of the interval.

  • groups (Dict[str, List[str]]) – Expansion of groups. Dictionary that maps the name of the group to the list of calendars that are members of this group.

  • calendars (Dict[str, List[TimeRange]]) – Free/busy information for calendars. Dictionary that maps calendar id to the list of time ranges during which this calendar should be regarded as busy.

  • groups_errors (Dict) – Optional error(s) (if computation for the group failed). Dictionary that maps the name of the group to the list of errors.

  • calendars_errors (Dict) – Optional error(s) (if computation for the calendar failed). Dictionary that maps calendar id to the list of errors.

Note

Errors have the following format:

{
  "domain": "<domain>",
  "reason": "<reason>"
}

Some possible values for “reason” are:

  • “groupTooBig” - The group of users requested is too large for a single query.

  • “tooManyCalendarsRequested” - The number of calendars requested is too large for a single query.

  • “notFound” - The requested resource was not found.

  • “internalError” - The API service has encountered an internal error.

Additional error types may be added in the future.

class gcsa.free_busy.FreeBusyQueryError(groups_errors, calendars_errors)