Google 日历:修改活动来宾状态
Google Calender: Modify Event Guest Status
在 google 日历中为我的应用程序脚本构建 API。
https://developers.google.com/apps-script/reference/calendar/
我想要做的是获得一个活动的嘉宾,并将他的状态从 "yes" 更改为 "no"。
var calendar = CalendarApp.getCalendarById('id');
var events = calendar.getEventsForDay(today);
Logger.log('Guest Status: ' + events[0].getGuestList()[0].getGuestStatus());
我上面的代码几乎可以获取来宾并获得他的状态,我正在查看活动来宾的 API 页面:
https://developers.google.com/apps-script/reference/calendar/event-guest
它只给你 getter 来宾的方法,有没有 setter 活动来宾的方法?我正在寻找一种为来宾设置状态的方法。我该怎么做?
使用 CalendarApp 只能使用 setMyStatus 方法,只能设置有效用户的事件状态。
如果所有用户都在您的域中,那么您可以想象 run a service account with domain delegation, calling the Calendar API 通过 UrlFetch
并冒充每个用户,为事件将他们的 "responseStatus" 设置为 "declined"。
在 google 日历中为我的应用程序脚本构建 API。
https://developers.google.com/apps-script/reference/calendar/
我想要做的是获得一个活动的嘉宾,并将他的状态从 "yes" 更改为 "no"。
var calendar = CalendarApp.getCalendarById('id');
var events = calendar.getEventsForDay(today);
Logger.log('Guest Status: ' + events[0].getGuestList()[0].getGuestStatus());
我上面的代码几乎可以获取来宾并获得他的状态,我正在查看活动来宾的 API 页面:
https://developers.google.com/apps-script/reference/calendar/event-guest
它只给你 getter 来宾的方法,有没有 setter 活动来宾的方法?我正在寻找一种为来宾设置状态的方法。我该怎么做?
使用 CalendarApp 只能使用 setMyStatus 方法,只能设置有效用户的事件状态。
如果所有用户都在您的域中,那么您可以想象 run a service account with domain delegation, calling the Calendar API 通过 UrlFetch
并冒充每个用户,为事件将他们的 "responseStatus" 设置为 "declined"。