class Events extends Resource (View source)

The "events" collection of methods.

Typical usage is:

 $calendarService = new Google\Service\Calendar(...);
 $events = $calendarService->events;

Methods

delete(string $calendarId, string $eventId, array $optParams = [])

Deletes an event. (events.delete)

get(string $calendarId, string $eventId, array $optParams = [])

Returns an event based on its Google Calendar ID. To retrieve an event using its iCalendar ID, call the events.list method using the iCalUID parameter.

import(string $calendarId, Event $postBody, array $optParams = [])

Imports an event. This operation is used to add a private copy of an existing event to a calendar. Only events with an eventType of default may be imported. Deprecated behavior: If a non-default event is imported, its type will be changed to default and any event-type-specific properties it may have will be dropped. (events.import)

insert(string $calendarId, Event $postBody, array $optParams = [])

Creates an event. (events.insert)

instances(string $calendarId, string $eventId, array $optParams = [])

Returns instances of the specified recurring event. (events.instances)

listEvents(string $calendarId, array $optParams = [])

Returns events on the specified calendar. (events.listEvents)

move(string $calendarId, string $eventId, string $destination, array $optParams = [])

Moves an event to another calendar, i.e. changes an event's organizer. Note that only default events can be moved; outOfOffice, focusTime, workingLocation and fromGmail events cannot be moved. (events.move)

patch(string $calendarId, string $eventId, Event $postBody, array $optParams = [])

Updates an event. This method supports patch semantics. (events.patch)

quickAdd(string $calendarId, string $text, array $optParams = [])

Creates an event based on a simple text string. (events.quickAdd)

update(string $calendarId, string $eventId, Event $postBody, array $optParams = [])

Updates an event. (events.update)

watch(string $calendarId, Channel $postBody, array $optParams = [])

Watch for changes to Events resources. (events.watch)

Details

delete(string $calendarId, string $eventId, array $optParams = [])

Deletes an event. (events.delete)

Parameters

string $calendarId

Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

string $eventId

Event identifier.

array $optParams

Optional parameters.

Exceptions

Exception

Event get(string $calendarId, string $eventId, array $optParams = [])

Returns an event based on its Google Calendar ID. To retrieve an event using its iCalendar ID, call the events.list method using the iCalUID parameter.

(events.get)

Parameters

string $calendarId

Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

string $eventId

Event identifier.

array $optParams

Optional parameters.

Return Value

Event

Exceptions

Exception

Event import(string $calendarId, Event $postBody, array $optParams = [])

Imports an event. This operation is used to add a private copy of an existing event to a calendar. Only events with an eventType of default may be imported. Deprecated behavior: If a non-default event is imported, its type will be changed to default and any event-type-specific properties it may have will be dropped. (events.import)

Parameters

string $calendarId

Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

Event $postBody
array $optParams

Optional parameters.

Return Value

Event

Exceptions

Exception

Event insert(string $calendarId, Event $postBody, array $optParams = [])

Creates an event. (events.insert)

Parameters

string $calendarId

Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

Event $postBody
array $optParams

Optional parameters.

Return Value

Event

Exceptions

Exception

Events instances(string $calendarId, string $eventId, array $optParams = [])

Returns instances of the specified recurring event. (events.instances)

Parameters

string $calendarId

Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

string $eventId

Recurring event identifier.

array $optParams

Optional parameters.

Return Value

Events

Exceptions

Exception

Events listEvents(string $calendarId, array $optParams = [])

Returns events on the specified calendar. (events.listEvents)

Parameters

string $calendarId

Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

array $optParams

Optional parameters.

Return Value

Events

Exceptions

Exception

Event move(string $calendarId, string $eventId, string $destination, array $optParams = [])

Moves an event to another calendar, i.e. changes an event's organizer. Note that only default events can be moved; outOfOffice, focusTime, workingLocation and fromGmail events cannot be moved. (events.move)

Parameters

string $calendarId

Calendar identifier of the source calendar where the event currently is on.

string $eventId

Event identifier.

string $destination

Calendar identifier of the target calendar where the event is to be moved to.

array $optParams

Optional parameters.

Return Value

Event

Exceptions

Exception

Event patch(string $calendarId, string $eventId, Event $postBody, array $optParams = [])

Updates an event. This method supports patch semantics. (events.patch)

Parameters

string $calendarId

Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

string $eventId

Event identifier.

Event $postBody
array $optParams

Optional parameters.

Return Value

Event

Exceptions

Exception

Event quickAdd(string $calendarId, string $text, array $optParams = [])

Creates an event based on a simple text string. (events.quickAdd)

Parameters

string $calendarId

Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

string $text

The text describing the event to be created.

array $optParams

Optional parameters.

Return Value

Event

Exceptions

Exception

Event update(string $calendarId, string $eventId, Event $postBody, array $optParams = [])

Updates an event. (events.update)

Parameters

string $calendarId

Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

string $eventId

Event identifier.

Event $postBody
array $optParams

Optional parameters.

Return Value

Event

Exceptions

Exception

Channel watch(string $calendarId, Channel $postBody, array $optParams = [])

Watch for changes to Events resources. (events.watch)

Parameters

string $calendarId

Calendar identifier. To retrieve calendar IDs call the calendarList.list method. If you want to access the primary calendar of the currently logged in user, use the "primary" keyword.

Channel $postBody
array $optParams

Optional parameters.

Return Value

Channel

Exceptions

Exception