首页 > 解决方案 > 在使用 iCalUID “导入”日历后,在“events.update()”功能上使用 Google Calendar API 向“与会者”发送通知时出现问题?

问题描述

在使用 iCalUID “导入”日历后,使用“events.update()”函数的 Google Calendar API 不会向“参加者”发送通知

仅供参考 - old_event 是service.events().get() response instance从不同邮件地址 abc@gmail.com 中的事件中捕获的“”。

new_event = old_event.copy()
new_event['organizer'] = {
        'self': True,
        'email': 'xyz@gmail.com'
        }
imported_event = new_service.events().import_(
        calendarId='primary',
        body=new_event
        ).execute()
updated_event_body = imported_event.copy()
updated_event_body['summary'] = 'New Summary'
updated_event = new_service.events().update(
        calendarId='primary',
        eventId=updated_event_body['id'],
        sendNotifications=True,
        body=updated_event_body
        ).execute()

请使用此链接在 Pastebin 上找到代码片段

标签: pythondjangogoogle-apigoogle-calendar-apigoogle-api-python-client

解决方案


sendNotifications 已弃用,您应该改用sendUpdates

看看这个帖子

谷歌日历 PHP API 不发送邀请电子邮件


推荐阅读