首页 > 解决方案 > Google calendar id length and event id length

问题描述

I try to search the default google calendar ID length and event ID length, but not able to find the information, I need to store the calendar ID and event ID in mysql, so the size is required.

I will not provide my own ID when add events/calendars, I am looking for the ID as :

If you do not specify an ID, it will be automatically generated by the server.

What is the length of such calendar ID and event ID?

标签: google-calendar-api

解决方案


回答:

日历 ID 不可写,由服务器生成。可以按照事件创建文档中的规定生成事件 ID。

更多信息:

根据有关事件的文档:插入

id string

事件的不透明标识符。在创建新的单个或重复事件时,您可以指定它们的 ID。提供的 ID 必须遵循以下规则:

  • ID 中允许的字符是 base32hex 编码中使用的字符,即小写字母 av 和数字 0-9,请参阅RFC2938中的第 3.1.2 节
  • ID 的长度必须介于 5 到 1024 个字符之间
  • 每个日历的 ID 必须是唯一的由于系统的全球分布特性,我们不能保证在事件创建时会检测到 ID 冲突。为了最大限度地降低冲突风险,我们建议使用已建立的 UUID 算法,例如RFC4122中描述的算法。如果不指定ID,则由服务器自动生成。

请注意, theicalUID和 theid不相同,在事件创建时只应提供其中一个。它们语义上的一个区别是,在重复事件中,一个事件的所有出现都有不同id的 s,而它们都共享相同icalUID的 s。

至于日历 ID,从日历资源页面可以看到,它id是不可写的。


推荐阅读