我在脚本中有以下代码:
var createdEvent = CalendarApp.getCalendarById(calendarId).createEvent(title, startTime, endTime, options);
createdEvent.guestsCanModify(true);
当我调用“ guestsCanModify()”方法时,出现以下错误:
Cannot find method guestsCanModify(boolean)
我为脚本启用了以下作用域:
"oauthScopes": ["https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/calendar.readonly",
"https://www.google.com/calendar/feeds",
"https://www.googleapis.com/auth/spreadsheets.currentonly",
"https://www.googleapis.com/auth/spreadsheets"]
我使用这种方法不正确吗? The documentation对我来说似乎很模糊。
我使用了错误的方法。正确的方法是“ setGuestsCanModify()”。