且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在google apps脚本中获取链接(url)到日历事件

更新时间:2023-12-05 21:01:40

对于给定事件类型 CalendarEvent 并给出 calendarId ,那么在Google日历应用程序中构建用于查看/编辑相应事件的URL的最简单且有效的方法如下: p>

For given event object of type CalendarEvent and given calendarId, the simplest and working way to build an URL to view/edit corresponding event in Google Calendar App is the following:

var splitEventId = event.getId().split('@');
var eventURL = "https://www.google.com/calendar/event?eid=" + Utilities.base64Encode(splitEventId[0] + " " + calendarId);

最棒的是没有Google API调用,身份验证......需要!

The best thing is that no Google API invocation, authentication, ... needed!