Now i could not find how to get, which event data modified or some event has been created.
How can I find event list by push notification headers data (mentioned in line 4.)
In Google Calendar settings, go to “Events from Gmail,” and check the box next to "Show events automatically created by Gmail in my calendar."
On the left side, under "Settings for my calendars," click the name of the calendar you want to share. Copy link. copy the link in "Public URL to this calendar" to share it. copy the link in "Public address in iCal format." The iCal address only works if the calendar is public.
As per documentation: The ETag (or entity tag) HTTP response header is an identifier for a specific version of a resource. It lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content was not changed.
There is no changed resource/event list in header data. Google just lets you know that something has changed in your calendar.
To get changed resources after every Google Post request, you need to list events of your calendar from google with syncToken
and save the new one which will appear as nextSyncToken
in response. If you provide syncToken
parameter in your request, you will only get the changes from syncToken
to now. Google calls this process incremental sync
.
https://developers.google.com/google-apps/calendar/v3/sync#incremental_sync
please read syncToken
and nextSyncToken
parameters from here: https://developers.google.com/google-apps/calendar/v3/reference/events/list
Additional links: How to handle Google Calendar API push notifications?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With