public class GoogleCalendarSource

  1. Object
  2. CalendarSource
  3. OAuthCalendarSource
  4. GoogleCalendarSource
Google Calendar and Google Tasks implementation. The application supplies OAuth tokens and chooses the scopes granted to its own OAuth client.

Fields

public static final String SCOPE_CALENDAR = "https://www.googleapis.com/auth/calendar"
public static final String SCOPE_TASKS = "https://www.googleapis.com/auth/tasks"

Constructors

public GoogleCalendarSource(CalendarTokenProvider tokens)
public GoogleCalendarSource(CalendarTokenProvider tokens, CalendarHttpTransport transport)

Methods

public CalendarCapabilities getCapabilities()
public AsyncResource<CalendarPage<CalendarInfo>> listCalendars(CalendarInfo.ContentType type, String pageToken)
public AsyncResource<CalendarInfo> saveCalendar(CalendarInfo calendar)
public AsyncResource<Boolean> deleteCalendar(String calendarId)
public AsyncResource<Boolean> deleteCalendar(CalendarInfo calendar)Deletes a calendar or task list.
public AsyncResource<CalendarPage<CalendarEvent>> queryEvents(CalendarQuery query)
public AsyncResource<CalendarEvent> getEvent(String calendarId, String eventId)
public AsyncResource<CalendarEvent> saveEvent(CalendarEvent event, CalendarMutationScope scope)
public AsyncResource<Boolean> deleteEvent(String calendarId, String eventId, CalendarMutationScope scope, String version)
public AsyncResource<CalendarEvent> respondToEvent(String calendarId, String eventId, CalendarAttendee.Response response, String comment)
public AsyncResource<List<FreeBusyInterval>> queryFreeBusy(List<String> calendarIds, Instant startTime, Instant endTime)
public AsyncResource<CalendarPage<CalendarTask>> queryTasks(CalendarQuery query)
public AsyncResource<CalendarTask> getTask(String listId, String taskId)
public AsyncResource<CalendarTask> saveTask(CalendarTask task, CalendarMutationScope scope)
public AsyncResource<Boolean> deleteTask(String listId, String taskId, CalendarMutationScope scope, String version)

Inherited methods

Field details

SCOPE_CALENDAR

public static final String SCOPE_CALENDAR = "https://www.googleapis.com/auth/calendar"

SCOPE_TASKS

public static final String SCOPE_TASKS = "https://www.googleapis.com/auth/tasks"

Constructor details

GoogleCalendarSource

public GoogleCalendarSource(CalendarTokenProvider tokens)

GoogleCalendarSource

public GoogleCalendarSource(CalendarTokenProvider tokens, CalendarHttpTransport transport)

Method details

getCapabilities

public CalendarCapabilities getCapabilities()

listCalendars

public AsyncResource<CalendarPage<CalendarInfo>> listCalendars(CalendarInfo.ContentType type, String pageToken)

saveCalendar

public AsyncResource<CalendarInfo> saveCalendar(CalendarInfo calendar)

deleteCalendar

public AsyncResource<Boolean> deleteCalendar(String calendarId)

deleteCalendar

public AsyncResource<Boolean> deleteCalendar(CalendarInfo calendar)
Deletes a calendar or task list. Sources that expose both use the content type to select the correct provider endpoint.

queryEvents

public AsyncResource<CalendarPage<CalendarEvent>> queryEvents(CalendarQuery query)

getEvent

public AsyncResource<CalendarEvent> getEvent(String calendarId, String eventId)

saveEvent

public AsyncResource<CalendarEvent> saveEvent(CalendarEvent event, CalendarMutationScope scope)

deleteEvent

public AsyncResource<Boolean> deleteEvent(String calendarId, String eventId, CalendarMutationScope scope, String version)

respondToEvent

public AsyncResource<CalendarEvent> respondToEvent(String calendarId, String eventId, CalendarAttendee.Response response, String comment)

queryFreeBusy

public AsyncResource<List<FreeBusyInterval>> queryFreeBusy(List<String> calendarIds, Instant startTime, Instant endTime)

queryTasks

public AsyncResource<CalendarPage<CalendarTask>> queryTasks(CalendarQuery query)

getTask

public AsyncResource<CalendarTask> getTask(String listId, String taskId)

saveTask

public AsyncResource<CalendarTask> saveTask(CalendarTask task, CalendarMutationScope scope)

deleteTask

public AsyncResource<Boolean> deleteTask(String listId, String taskId, CalendarMutationScope scope, String version)