6

I'm syncing the Google Calendar with my application (I store events in a database). When an event is updated I can easily find the last updates by sorting the event feed on the 'updated' order. However, if an event is removed / deleted, how can I track this update from the feed?

Kara
  • 6,115
  • 16
  • 50
  • 57
hsmit
  • 3,906
  • 7
  • 34
  • 46

2 Answers2

8

Try to add showdeleted=true to your query feed and then check for EventStatus.CANCELED on retrieved entries.

Check this thread for further information.

systempuntoout
  • 71,966
  • 47
  • 171
  • 241
  • I can confirm that this is stil the case in 2016. I created then deleted an event and used google API explorer to view the result. It just turns "cancelled". All other details of the event is still shown. – Wasted_Coder Jun 16 '16 at 08:52
-1

I did exactly the thing you want to do (see this post: http://code.pui.ch/2009/12/29/fetch-publicly-available-google-calendar-data-with-python/):

I have a database with events imported from Google and events that can be edited from an admin interface (Django). All events I import from Google I mark in the database with a flag. When importing from Google I first delete all events in the future and then INSERT all events I retrieve from Google.

To circumvent that the events get new ids with every import I did some hacking (python. It's very hackish, but it solved my case):

    guid_int = "".join(re.findall('[0-9]*', str(vevent.get('UID'))))
    guid_int = guid_int[:9]

guid_int is what I use as the primary key in the database..

hansaplast
  • 11,007
  • 2
  • 61
  • 75