我查看了谷歌日历 Node js api,这并不清楚。
如何使用 Nodejs 谷歌日历库设置网络 Hook ?
当我的客户在其 Google 日历上添加或更改约会时,我想告诉 Google 对服务器执行 ping 操作吗?
如何使用 Nodejs 设置 watch ?
最佳答案
Google 日历 API 提供 push notifications让您可以监视资源的更改(Webhooks)。
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/