Acl: watch

监控 ACL 资源的更改。

请求

HTTP 请求

POST https://www.googleapis.com/calendar/v3/calendars/calendarId/acl/watch

参数

参数名称 说明
路径参数
calendarId string 日历标识符。要检索日历 ID,请调用 calendarList.list 方法。如果您想访问当前登录用户的主日历,请使用“primary”关键字。

授权

此请求需要获得以下范围的授权:

范围
https://www.googleapis.com/auth/calendar

如需了解详情,请参阅身份验证和授权页面。

请求正文

在请求正文中,请按以下结构提供数据:

{
  "id": string,
  "token": string,
  "type": string,
  "address": string,
  "params": {
    "ttl": string
  }
}
属性名称 说明 备注
id string 用于标识此频道的 UUID 或类似的唯一字符串。
token string 传送到目标地址的任意字符串,每条通知通过此渠道传送。可选。
type string 用于此渠道的传送机制的类型。有效值为“web_hook”(或“webhook”)。这两个值都表示使用 HTTP 请求传递消息的通道。
address string 为此频道发送通知的地址。
params object 用于控制投放渠道行为的其他参数。可选。
params.ttl string 通知渠道的存留时间(以秒为单位)。默认值为 604800 秒。

响应

如果成功,此方法将返回采用以下结构的响应正文:

{
  "kind": "api#channel",
  "id": string,
  "resourceId": string,
  "resourceUri": string,
  "token": string,
  "expiration": long
}
属性名称 说明 备注
kind string 将此标识为用于监控资源(即“api#channel”)更改的通知渠道。
id string 用于标识此频道的 UUID 或类似的唯一字符串。
resourceId string 不透明 ID,用于标识此频道中正在监控的资源。在不同的 API 版本中保持稳定。
resourceUri string 所监控资源的版本特定标识符。
token string 传送到目标地址的任意字符串,每条通知通过此渠道传送。可选。
expiration long 通知渠道到期的日期和时间,以 Unix 时间戳表示,以毫秒为单位。可选。