问题描述
- 使用Google日历设置频道。
- 创建Google日历事件。
- 获得一个推送通知,其中包含以下内容数据。
- X-Goog-Resource-Id,X-Goog-Resource-Uri,X-Goog-Channel-Id
- Set channel with google calendar.
- Create a google calendar event.
- got a push notification contains following data.
- X-Goog-Resource-Id,X-Goog-Resource-Uri,X-Goog-Channel-Id
现在我找不到方法,已修改事件数据或已创建某些事件。
Now i could not find how to get, which event data modified or some event has been created.
我如何找到事件列表通过推送通知头数据(在第4行中提到)。
How can I find event list by push notification headers data (mentioned in line 4.)
推荐答案
头数据中没有更改的资源/事件列表。 Google只是通知您日历中发生了某些变化。
There is no changed resource/event list in header data. Google just lets you know that something has changed in your calendar.
要在每次Google Post请求后获取更改的资源,您需要使用 syncToken
列出Google日历中的事件并保存一个新的,作为响应显示为 nextSyncToken
。如果在请求中提供 syncToken
参数,则只会获得从 syncToken
到现在的更改。 Google将此过程称为增量同步
。
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
.
请阅读 syncToken 和
nextSyncToken
参数:
其他链接:
这篇关于从推送通知Google日历上的资源ID获取事件信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!