I'm using Google API v3 for Google Calendar. I'm able to add a recurrent event to Google Calendar but when trying to delete only the first occurrence of the series, the whole series gets deleted.
I'm using Python and authomatic_inst library and I'm passing the event_id as follows: baseID_yyyymmddThhmmssZ
The delete request acts as if I only passed the baseID but I've checked the whole ID (ID with date and time) is passed.
I've used this reference (https://developers.google.com/google-apps/calendar/v3/reference/events) to retrieve the instances of the series and make sure the id of the first event is correct, but although deleting it from the try it! tool works, it does not work for me from Python.
def delete_gcal_event(google_event_id):
# google_event_id in the form baseID_yyyymmddThhmmssZ
# Deserialize the user's API credentials from the session storage
credentials = authomatic_inst.credentials(session['google_credentials'])
if not credentials.valid:
credentials.refresh()
session['google_credentials'] = credentials.serialize()
response = authomatic_inst.access(
credentials,
api_url('calendars/{}/events/{}', 'primary', google_event_id),
method='DELETE',
headers=JSON_HEADERS)
if (response.status == 204):
return dict(success = True,
message = "Event deleted successfully",
status = response.status)
else:
return dict(success = False,
message = "Error when deleting event from google",
status = response.status)
Did anyone came across this issue before?
Many thanks, Javier