Google Calendars API-新日历事件或现有事件更新的监听器? [英] Google Calendars API - Listener for new calendar events or updates to existing events?
问题描述
我有一个Python脚本,它将处理Google日历中的所有事件,格式化文本并向网站发送发帖请求,效果很好.
I have a Python script that will take all of the events from a Google Calendar, format the text and send a post request to a website, which works fine.
当前,每次添加或更改事件时,我都必须打开它.我想知道如何设置侦听器,以便在有新的日历事件或对现有日历事件有更新时触发该函数?我查看了文档,但找不到任何好的解决方案.
Currently, I would have to open it each time an event is added or changed. I am wondering how can I setup a listener so that the function will fire whenever there are new calendar events or updates to existing ones? I have looked into the documentation but have not been able to find any good solution.
谢谢!
推荐答案
您应该利用webhooks来监听事件中的任何更新.在此处阅读 https://developers.google.com/calendar/v3/push
You should make use of the webhooks to listen to any updates in the events. Read here, https://developers.google.com/calendar/v3/push
这篇关于Google Calendars API-新日历事件或现有事件更新的监听器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!