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

问题描述

我如何停止观看整个频道?以下复制的需要 resourceId ,这似乎意味着它只会停止观察特定于 resourceId 的事件。出于我的目的,我认为 channelId 就足够了,因此不知道要为 resourceId 放置什么。该字段不是可选的。

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


解决方案

事实证明, resourceId 与导致推送通知的事件无关。在您的应用程序中,您应该同时存储 channelId resourceId 并根据需要提供以停止通知。仍然不确定Google为什么要求两个ID用于一个目的。似乎多余。

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"
}
解决方案

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日历活动的整个频道?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-17 00:50