暴露可永久清空日历及删除日历或事件的操作
原文依据:3 处目录明确提供清空主日历全部事件、删除次级日历和删除单个事件的方法。可见规则只要求先检查参数,没有要求逐次确认、备份或限制目标日历。
代理选错账号、日历 ID 或事件 ID 时,可能删除用户的日程记录并影响受邀者;主日历清空会一次删除其中全部事件。
这些是可调用方法的目录,不是自动删除指令;但其中明确包含清空主日历全部事件、删除次级日历和删除单个事件的能力。若代理在用户没有明确指定目标或确认影响时调用,可能造成不可逆的数据损失。文件只要求先检查方法参数,没有可见的备份或逐次确认约束。用户可限制为只读方法,并要求任何 `clear` 或 `delete` 调用前显示账号、日历和事件目标并单独确认。
- `clear` — Clears a primary calendar. This operation deletes all events associated with the primary calendar of an account. - `delete` — Deletes a secondary calendar. Use calendars.clear for clearing all events on primary calendars. - `get` — Returns metadata for a calendar.查看另外 2 个位置
- `delete` — Deletes an event. - `get` — Returns an event based on its Google Calendar ID. To retrieve an event using its iCalendar ID, call the events.list method using the iCalUID parameter.Before calling any API method, inspect it:```bash# Browse resources and methodsgws calendar --help# Inspect a method's required params, types, and defaultsgws schema calendar.<resource>.<method>```