google-apps-script - 由于不同的 eventId 格式,无法为在 iOS 上创建的事件加载带有 getEventByID 的日历事件
问题描述
我有一个包含事件列表的 Google 表格,每一行都包含 CalendarId 和 EventId。
一些 EventId 的格式不同。例如:
- usual format: 2nn755esk1ddgg8bf4efabq5i0@google.com
- different format: 4F29BF66-4264-44E9-9162-9E6B9B97AF53
当我尝试加载具有不同格式的事件时,我得到“null”而不是事件对象。
示例代码:
// event load returns null
var calendar1 = CalendarApp.getCalendarById('stepvda.net_qfrvg5ejjrv97ps04o16fjiokk@group.calendar.google.com');
var event1 = calendar1.getEventById('4F29BF66-4264-44E9-9162-9E6B9B97AF53');
// event code returns event object correctly
var calendar2 = CalendarApp.getCalendarById('stepvda.net_dunvv2cuqlirkucfamgj0vec18@group.calendar.google.com');
var event2 = calendar2.getEventById('2nn755esk1ddgg8bf4efabq5i0@google.com');
我注意到不同的 eventId 格式似乎来自我在 iPhone 上的 iOS 中创建的事件,其中正常格式是我在 Google 日历网络应用程序中创建的事件。
知道如何为 eventId 加载具有不同格式的事件吗?
解决方案
推荐阅读
- c++ - utf-8, std::wstring & ncurses
- realm - 开发者版上的领域功能
- java - Intellij IDEA - 代码和注释的不同列包装值
- .net - VS2017 - 框架 4.6.2 在 c# 的类库项目中未显示为选项,但它在 vb windows 窗体中
- python - 数据帧(5mb)消耗所有可用内存,系统崩溃
- python - 如何运行时警告:LDA 中的 exp 中遇到溢出
- python - 一对多图像比较 SURF python
- java - Map 中最终类的杰克逊反序列化问题
- javascript - 我可以通过对开发做出反应来加速 webpack 捆绑吗?
- reactjs - 使用 reactJS 为 CSS 创建唯一 ID