问题描述
- 使用谷歌日历设置频道.
- 创建一个谷歌日历活动.
- 收到包含以下数据的推送通知.
- 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.)
推荐答案
标头数据中没有更改的资源/事件列表.谷歌只是让你知道你的日历发生了一些变化.
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.
https://developers.google.com/google-apps/日历/v3/sync#incremental_sync
请从此处阅读 syncToken 和 nextSyncToken 参数:https://developers.google.com/google-apps/calendar/v3/reference/events/list
please read syncToken and nextSyncToken parameters from here: https://developers.google.com/google-apps/calendar/v3/reference/events/list
其他链接:如何处理 Google Calendar API 推送通知?
这篇关于从推送通知谷歌日历上的资源 id 获取事件信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!



大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)