如何停止观看 Google 个日历事件的整个频道?

How to stop watch on entire channel of Google calendar events?

如何停止观看整个频道?下面转载的 API reference 需要一个 resourceId,似乎暗示它只是停止监视特定于 resourceId 的事件。出于我的目的,我认为 channelId 就足够了,因此不确定为 resourceId 放什么。该字段不是可选的。

POST https://www.googleapis.com/calendar/v3/channels/stop
Authorization: Bearer {auth_token_for_current_user}
Content-Type: application/json
{
  "id": "4ba78bf0-6a47-11e2-bcfd-0800200c9a66",
  "resourceId": "ret08u3rv24htgh289g"
}

事实证明,resourceId 与导致推送通知的事件无关。在您的应用中,您应该存储 channelIdresourceId 并根据需要提供它以停止通知。仍然不确定为什么 Google 需要两个 id 用于一个目的。显得多余。