node.js - 如何在 Nodejs 中设置谷歌日历网络钩子(Hook)?

标签 node.js google-api google-calendar-api google-api-client

我查看了谷歌日历 Node js api,这并不清楚。

如何使用 Nodejs 谷歌日历库设置网络 Hook ?

当我的客户在其 Google 日历上添加或更改约会时,我想告诉 Google 对服务器执行 ping 操作吗?

如何使用 Nodejs 设置 watch ?

最佳答案

Google 日历 API 提供 push notifications让您可以监视资源的更改(Webhooks)。

<表类=“s-表”> <标题> Google 日历推送通知                                                                                 View in Fusebit
const calendar = googleClient.calendar('v3');
const watchResponse = await calendar.events.watch({
  resource: {
      id: uuidv4(),
      type: 'web_hook',
      address: 'Your webhook address here'
    },
    calendarId: 'primary'
  });
  
const { data } = watchResponse;
console.log('Calendar Webhook created', data);

关于node.js - 如何在 Nodejs 中设置谷歌日历网络钩子(Hook)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71018001/

相关文章:

javascript - “Uncaught TypeError: Cannot read property ' 人 ' of undefined ”

go - 在 Go 中连接 Google Calendar API 的凭据

javascript - 从命令行读取参数 - 错误 TS2304 : Cannot find name 'process'

javascript - Node.js 创建的服务器在首页加载时发出 3 个请求,在每次页面刷新后发出 2 个请求?

python - 如何列出 Google Merchant Center Feed

google-api - Google日历-访问权限

javascript - Google Calendar 嵌套 JSON -- 无法读取未定义的属性 'length'

javascript - Node js 无访问控制允许其他问题的原始答案也不起作用

javascript - WebStorm - 制作 node_modules "library root"但也将其排除在索引之外

android - 谷歌云端硬盘 SDK 和 API