Google calendar api 保持定期事件的实例同步
我一整天都在想如何从我的应用程序中“重新水化”重复事件的实例 让我快速解释一下流程:Google calendar api 保持定期事件的实例同步,google-calendar-api,Google Calendar Api,我一整天都在想如何从我的应用程序中“重新水化”重复事件的实例 让我快速解释一下流程: 用户授予对“我的应用”的访问权限以编辑其日历 应用程序将设置一个重复事件 应用程序订阅该日历的/watch端点 到目前为止还不错,现在当创建者将该事件移动到另一个时间时,我在webhook url上收到一个通知,这很好(好吧,sorta),它看起来如下所示: 'x-goog-channel-id': 'my_specified_channel_id', 'x-goog-channel-expiratio
/watch
端点 'x-goog-channel-id': 'my_specified_channel_id',
'x-goog-channel-expiration': 'Thu, 29 Sep 2016 12:58:10 GMT',
'x-goog-resource-state': 'exists',
'x-goog-message-number': '333384',
'x-goog-resource-id': 'some-resource-id', // This id apparently has nothing to do with any resources I know of
'x-goog-resource-uri': 'https://www.googleapis.com/.../resource-uri'
所以我想我可以调用https://www.googleapis.com/calendar/v3/calendars/primary/events/some-resource-id
并获取更新的资源,但是资源id
似乎与日历中的任何事件无关,也不是日历本身的id(我使用'primary'
关键字)
所以我想,作为一种解决办法,我可以使用https://www.googleapis.com/calendar/v3/calendars/primary/events/recurring-event-id/instances
endpoint,但现在移动的事件不再是该有效负载的一部分。我猜google会从父事件中删除该事件,因为它不再在一天中的同一时间发生(我在任何地方都无法确认这一点)
所以我想问的是:
x-goog-resource-id
错误回答我自己的问题:
x-goog-resource-id
是日历的标识符,因为它是您放置观察者的实体回答我自己的问题:
x-goog-resource-id
是日历的标识符,因为它是您放置观察者的实体