如何停止观看整个 Google 日历活动频道? [英] How to stop watch on entire channel of Google calendar events?

查看:15
本文介绍了如何停止观看整个 Google 日历活动频道?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何停止观看整个频道?下面复制的 API 参考需要 resourceId,似乎暗示它只会停止观看特定于 resourceId 的事件.就我的目的而言,我认为 channelId 就足够了,因此不确定为 resourceId 放置什么.该字段不是可选的.

How do I stop watching the entire channel? The API reference reproduced below requires a resourceId, seemingly implying that it only stops watching the event specific to the resourceId. For my purposes, I would think that a channelId is enough and therefore uncertain what to put for resourceId. The field is not optional.

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 来实现一个目的.似乎多余.

It turns out that the resourceId has nothing to do with the event that caused the push notification. In your app, you should store both the channelId and resourceId and provide it as required to stop notifications. Still not sure why Google requires two ids for a single purpose. Seems redundant.

这篇关于如何停止观看整个 Google 日历活动频道?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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