gdata-java-api 的 CalendarEventEntry.getTimes() 返回什么?

发布于 2024-12-07 17:38:34 字数 648 浏览 0 评论 0原文

我一直在 api 文档中查找,但无法确定该方法是否以及何时返回多个 When 实例。 代码 似乎解析重复出现的 元素,common elements部分在gd:when属性后面有一个*,表示可以有多个该类型的元素。但描述暗示只有一个事件元素。

那么在哪种情况下 CalendarEventEntry.getTimes() 返回多个 When 实例呢?似乎可以通过 addTime() 添加多个实例,但是可以通过默认的 Web 界面来完成吗?

I've been looking up and down the api-docs and couldn't find out if and when the method returns more than one When instance. The code seems to parse repeating occurrences of <gd:when> elements, the common elements section of the protocol description has a * after the gd:when property, indicating that there can be multiple elements of this type. But the description implies that there is only one event element.

So in which case does CalendarEventEntry.getTimes() return more than one When instance? It seems to be possible to add multiple instances via addTime(), but can you do it via the default web interface?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清浅ˋ旧时光 2024-12-14 17:38:34

答案可以在数据 API 开发人员指南:协议:部分中找到“创建重复事件”


  • 无查询参数:重复事件作为单个元素或对象返回,并带有重复子元素或属性。当元素或属性包含在重复事件中时,否。
  • 指定 start-min 和/或 start-max:重复发生的事件表示为单个元素或对象,在指定范围内每次出现时具有多个 when 元素或对象。还包括复发。
  • singleevents=true:重复事件以与单个事件相同的格式表示,每次事件发生时使用单个元素或对象。 每个事件都包含一个when元素或对象,但不包含重复语法。但是,它包含一个originalEvent元素或属性。

The answer can be found in Data API Developer's Guide: The Protocol: Section "Creating Recurring Events":


  • No query parameters: a recurring event is returned as a single element or object, with a recurrence child element or property. No when elements or properties are included in the recurring event.
  • start-min and/or start-max specified: a recurring event is represented as a single element or object, with multiple when elements or objects for each occurrence in the range specified. A recurrence is also included.
  • singleevents=true: recurring events are represented in the same format as single events, with a single element or object per occurrence of the event. Each event includes a single when element or object, but does not include the recurrence syntax. It does, however, include an originalEvent element or property.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文