Change exisiting calendar event series date

2019-06-13 20:04发布

问题:

I have a problem regarding the changing of dates of a Google Calendar Event series. The API doesn't have any methods for changing the dates.

Is there a way I can do this? I am creating a form where when you edit the due date of the request in the spreadsheet, it will also edit the calendar event series.

回答1:

Your statement is incorrect it is possible to change or update the date of a Google calendar event using the Google Calendar API.

Option nr 1:

You can patch the event in the body you include the variables you would like to update or patch. In this case date.

Events: patch Updates an event.

Request

PATCH https://www.googleapis.com/calendar/v3/calendars/{calendarId}/events/{eventID}?key={YOUR_API_KEY}
{
 "start": {
  "dateTime": "2008-09-26T12:01:00+02:00"
 }
}

Response

200 OK

Option nr 2

Another option would be to first use Events.get to get the event change what you need then do events.update. This will do an update on everything in the event. While Patch just changes one what you need.