从推送通知Google日历上的资源ID获取事件信息 [英] Get event info from resource id on push notification google calendar

查看:78
本文介绍了从推送通知Google日历上的资源ID获取事件信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 使用Google日历设置频道。

  2. 创建Google日历事件。

  3. 获得一个推送通知,其中包含以下内容数据。

  4. X-Goog-Resource-Id,X-Goog-Resource-Uri,X-Goog-Channel-Id

  1. Set channel with google calendar.
  2. Create a google calendar event.
  3. got a push notification contains following data.
  4. 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.

https: //developers.google.com/google-apps/calendar/v3/sync#incremental_sync

请阅读 syncToken nextSyncToken 参数: https://developers.google.com/google-apps/calendar/v3/reference/events/list

其他链接:如何处理Google Calendar API推送通知?

这篇关于从推送通知Google日历上的资源ID获取事件信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆