# Class GoogleCalendarSource

java.lang.Object
com.codename1.calendar.CalendarSource
com.codename1.calendar.OAuthCalendarSource
com.codename1.calendar.GoogleCalendarSource

public class GoogleCalendarSource extends OAuthCalendarSource
Google Calendar and Google Tasks implementation. The application supplies OAuth tokens and chooses the scopes granted to its own OAuth client.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `SCOPE_CALENDAR`
  `static final String`
  `SCOPE_TASKS`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GoogleCalendarSource(CalendarTokenProvider tokens)`
  `GoogleCalendarSource(CalendarTokenProvider tokens, CalendarHttpTransport transport)`

- ## Method Summary

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

  ### Methods inherited from class OAuthCalendarSource

  `getAuthorizationStatus, json, raw, requestAuthorization`

  ### Methods inherited from class CalendarSource

  `addChangeListener, completed, fireChange, getDisplayName, getId, isAvailable, removeChangeListener, unavailable, unsupported`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### SCOPE_CALENDAR

    public static final String SCOPE_CALENDAR
    See Also:
      - Constant Field Values

  - ### SCOPE_TASKS

    public static final String SCOPE_TASKS
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### GoogleCalendarSource

    public GoogleCalendarSource(CalendarTokenProvider tokens)

  - ### GoogleCalendarSource

    public GoogleCalendarSource(CalendarTokenProvider tokens, CalendarHttpTransport transport)

- ## Method Details

  - ### getCapabilities

    public CalendarCapabilities getCapabilities()
    Overrides:
      `getCapabilities` in class `CalendarSource`

  - ### listCalendars

    public AsyncResource<CalendarPage<CalendarInfo>> listCalendars(CalendarInfo.ContentType type, String pageToken)
    Overrides:
      `listCalendars` in class `CalendarSource`

  - ### saveCalendar

    public AsyncResource<CalendarInfo> saveCalendar(CalendarInfo calendar)
    Overrides:
      `saveCalendar` in class `CalendarSource`

  - ### deleteCalendar

    public AsyncResource<Boolean> deleteCalendar(String calendarId)
    Overrides:
      `deleteCalendar` in class `CalendarSource`

  - ### queryEvents

    public AsyncResource<CalendarPage<CalendarEvent>> queryEvents(CalendarQuery query)
    Overrides:
      `queryEvents` in class `CalendarSource`

  - ### getEvent

    public AsyncResource<CalendarEvent> getEvent(String calendarId, String eventId)
    Overrides:
      `getEvent` in class `CalendarSource`

  - ### saveEvent

    public AsyncResource<CalendarEvent> saveEvent(CalendarEvent event, CalendarMutationScope scope)
    Overrides:
      `saveEvent` in class `CalendarSource`

  - ### deleteEvent

    public AsyncResource<Boolean> deleteEvent(String calendarId, String eventId, CalendarMutationScope scope, String version)
    Overrides:
      `deleteEvent` in class `CalendarSource`

  - ### respondToEvent

    public AsyncResource<CalendarEvent> respondToEvent(String calendarId, String eventId, CalendarAttendee.Response response, String comment)
    Overrides:
      `respondToEvent` in class `CalendarSource`

  - ### queryFreeBusy

    public AsyncResource<List<FreeBusyInterval>> queryFreeBusy(List<String> calendarIds, long startTime, long endTime)
    Overrides:
      `queryFreeBusy` in class `CalendarSource`

  - ### queryTasks

    public AsyncResource<CalendarPage<CalendarTask>> queryTasks(CalendarQuery query)
    Overrides:
      `queryTasks` in class `CalendarSource`

  - ### getTask

    public AsyncResource<CalendarTask> getTask(String listId, String taskId)
    Overrides:
      `getTask` in class `CalendarSource`

  - ### saveTask

    public AsyncResource<CalendarTask> saveTask(CalendarTask task, CalendarMutationScope scope)
    Overrides:
      `saveTask` in class `CalendarSource`

  - ### deleteTask

    public AsyncResource<Boolean> deleteTask(String listId, String taskId, CalendarMutationScope scope, String version)
    Overrides:
      `deleteTask` in class `CalendarSource`