Calendar API . freebusy

Instance Methods

query(body=None)

Returns free/busy information for a set of calendars.

Method Details

query(body=None)
Returns free/busy information for a set of calendars.

Args:
  body: object, The request body.
    The object takes the form of:

{
    "calendarExpansionMax": 42, # Maximal number of calendars for which FreeBusy information is to be provided. Optional. Maximum value is 50.
    "groupExpansionMax": 42, # Maximal number of calendar identifiers to be provided for a single group. Optional. An error is returned for a group with more members than this value. Maximum value is 100.
    "timeMax": "A String", # The end of the interval for the query formatted as per RFC3339.
    "items": [ # List of calendars and/or groups to query.
      {
        "id": "A String", # The identifier of a calendar or a group.
      },
    ],
    "timeMin": "A String", # The start of the interval for the query formatted as per RFC3339.
    "timeZone": "UTC", # Time zone used in the response. Optional. The default is UTC.
  }


Returns:
  An object of the form:

    {
    "timeMax": "A String", # The end of the interval.
    "kind": "calendar#freeBusy", # Type of the resource ("calendar#freeBusy").
    "calendars": { # List of free/busy information for calendars.
      "a_key": { # Free/busy expansions for a single calendar.
        "busy": [ # List of time ranges during which this calendar should be regarded as busy.
          {
            "start": "A String", # The (inclusive) start of the time period.
            "end": "A String", # The (exclusive) end of the time period.
          },
        ],
        "errors": [ # Optional error(s) (if computation for the calendar failed).
          {
            "domain": "A String", # Domain, or broad category, of the error.
            "reason": "A String", # Specific reason for the error. Some of the possible values 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, so clients should gracefully handle additional error statuses not included in this list.
          },
        ],
      },
    },
    "timeMin": "A String", # The start of the interval.
    "groups": { # Expansion of groups.
      "a_key": { # List of calendars that are members of this group.
        "errors": [ # Optional error(s) (if computation for the group failed).
          {
            "domain": "A String", # Domain, or broad category, of the error.
            "reason": "A String", # Specific reason for the error. Some of the possible values 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, so clients should gracefully handle additional error statuses not included in this list.
          },
        ],
        "calendars": [ # List of calendars' identifiers within a group.
          "A String",
        ],
      },
    },
  }