Interface CalendarOperations

    • Field Detail

      • PRIMARY_CALENDAR_ID

        static final String PRIMARY_CALENDAR_ID
        The identifier for the user's primary calendar.
        See Also:
        Constant Field Values
    • Method Detail

      • calendarListQuery

        CalendarListQueryBuilder calendarListQuery()
        Create a builder pattern object for refining a query that lists the calendars that are accessible to the authenticated user.
        Returns:
        a query builder for listing calendars.
      • getCalendar

        Calendar getCalendar​(String calendarId)
        Fetch a calendar from the user's calendar list.
        Parameters:
        calendarId - the calendar's identifier. The special identifier "primary" (PRIMARY_CALENDAR_ID) may be used.
        Returns:
        the calendar.
      • eventListQuery

        EventListQueryBuilder eventListQuery​(String calendarId)
        Create a builder pattern object for refining a query that lists the events that are accessible to the authenticated user.
        Parameters:
        calendarId - the calendar's identifier. The special identifier "primary" (PRIMARY_CALENDAR_ID) may be used.
        Returns:
        a query builder for listing events.
      • getEvent

        Event getEvent​(String calendarId,
                       String eventId)
        Fetch an event from the specified calendar.
        Parameters:
        calendarId - the calendar's identifier. The special identifier "primary" (PRIMARY_CALENDAR_ID) may be used.
        eventId - the event's identifier.
        Returns:
        the event.
      • quickAddEvent

        Event quickAddEvent​(String calendarId,
                            String specification,
                            boolean sendNotifications)
        Create a new event in the specified calendar, based on the specification text.
        Parameters:
        calendarId - the calendar's identifier. The special identifier "primary" (PRIMARY_CALENDAR_ID) may be used.
        specification - text describing the event to be created.
        sendNotifications - whether to send notifications about the creation of the event.
        Returns:
        the new event.
      • deleteEvent

        void deleteEvent​(String calendarId,
                         String eventId,
                         boolean sendNotifications)
        Delete an existing event.
        Parameters:
        calendarId - the identifier of the calendar containing the event. The special identifier "primary" (PRIMARY_CALENDAR_ID) may be used.
        eventId - the event's identifier.
        sendNotifications - whether to send notifications about the deletion of the event.
      • updateEvent

        void updateEvent​(String calendarId,
                         Event event,
                         boolean sendNotifications)
        Update an existing event.
        Parameters:
        calendarId - The identifier of the calendar containing the event. The special identifier "primary" (PRIMARY_CALENDAR_ID) may be used.
        event - The event to update.
        sendNotifications - Whether to send notifications about the update to the event.