Calendar API . freebusy

Instance Methods

close()

Close httplib2 connections.

query(body=None)

Returns free/busy information for a set of calendars.

Method Details

close()
Close httplib2 connections.
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.
  "items": [ # List of calendars and/or groups to query.
    {
      "id": "A String", # The identifier of a calendar or a group.
    },
  ],
  "timeMax": "A String", # The end of the interval for the query formatted as per RFC3339.
  "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:

    {
  "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.
        {
          "end": "A String", # The (exclusive) end of the time period.
          "start": "A String", # The (inclusive) start 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.
        },
      ],
    },
  },
  "groups": { # Expansion of groups.
    "a_key": { # List of calendars that are members of this group.
      "calendars": [ # List of calendars' identifiers within a group.
        "A String",
      ],
      "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.
        },
      ],
    },
  },
  "kind": "calendar#freeBusy", # Type of the resource ("calendar#freeBusy").
  "timeMax": "A String", # The end of the interval.
  "timeMin": "A String", # The start of the interval.
}