为什么 Google 日历 API returns 在时间受限时不一致的事件?
Why does the Google Calendar API returns inconsistent events when time-constrained?
我想通过 timeMin
和 timeMax
之间的 REST API. After having authenticated I request events 查询 Google 日历。在下面的例子中,这是从 'now' 开始的 +/- 7 天(在 2015-09-30T14:19:46.595026+02:00
和 2015-10-14T14:19:46.594026+02:00
之间):
curl -H 'Authorization: Bearer the-token-I-got-and-which-is-OK' 'https://www.googleapis.com/calendar/v3/calendars/something_correct@group.calendar.google.com/events?timeMax=2015-10-14T14%3A19%3A46.594026%2B02%3A00&timeMin=2015-09-30T14%3A19%3A46.595026%2B02%3A00'
结果,我得到了两个事件 - 但时间不对:
{
"kind": "calendar#events",
(...)
"items": [
{
"kind": "calendar#event",
(...)
"start": {
"dateTime": "2015-01-09T07:00:00+01:00",
"timeZone": "Europe/Paris"
},
"end": {
"dateTime": "2015-01-09T07:15:00+01:00",
"timeZone": "Europe/Paris"
},
(...)
},
{
"kind": "calendar#event",
(...)
"start": {
"dateTime": "2015-01-10T07:30:00+01:00",
"timeZone": "Europe/Paris"
},
"end": {
"dateTime": "2015-01-10T07:45:00+01:00",
"timeZone": "Europe/Paris"
(...)
}
]
}
1 月 有两个事件。它们确实存在于日历中,并且是该日历中的前两个事件(它们是周期性事件,没有结束日期)。
为什么时间限制没有生效?
如果我删除时间限制,我会收到更多事件,但仍然不是所有事件(我想这可能是 API 的限制,需要一些滚动 - 我没有调查那个时间点约束将仅匹配大约 10 个条目)。日期各不相同,但比现在更接近一月。
我缺少 singleEvents
参数,默认情况下为 False
。
Whether to expand recurring events into instances and only return
single one-off events and instances of recurring events, but not the
underlying recurring events themselves. Optional. The default is
False.
我想通过 timeMin
和 timeMax
之间的 REST API. After having authenticated I request events 查询 Google 日历。在下面的例子中,这是从 'now' 开始的 +/- 7 天(在 2015-09-30T14:19:46.595026+02:00
和 2015-10-14T14:19:46.594026+02:00
之间):
curl -H 'Authorization: Bearer the-token-I-got-and-which-is-OK' 'https://www.googleapis.com/calendar/v3/calendars/something_correct@group.calendar.google.com/events?timeMax=2015-10-14T14%3A19%3A46.594026%2B02%3A00&timeMin=2015-09-30T14%3A19%3A46.595026%2B02%3A00'
结果,我得到了两个事件 - 但时间不对:
{
"kind": "calendar#events",
(...)
"items": [
{
"kind": "calendar#event",
(...)
"start": {
"dateTime": "2015-01-09T07:00:00+01:00",
"timeZone": "Europe/Paris"
},
"end": {
"dateTime": "2015-01-09T07:15:00+01:00",
"timeZone": "Europe/Paris"
},
(...)
},
{
"kind": "calendar#event",
(...)
"start": {
"dateTime": "2015-01-10T07:30:00+01:00",
"timeZone": "Europe/Paris"
},
"end": {
"dateTime": "2015-01-10T07:45:00+01:00",
"timeZone": "Europe/Paris"
(...)
}
]
}
1 月 有两个事件。它们确实存在于日历中,并且是该日历中的前两个事件(它们是周期性事件,没有结束日期)。
为什么时间限制没有生效?
如果我删除时间限制,我会收到更多事件,但仍然不是所有事件(我想这可能是 API 的限制,需要一些滚动 - 我没有调查那个时间点约束将仅匹配大约 10 个条目)。日期各不相同,但比现在更接近一月。
我缺少 singleEvents
参数,默认情况下为 False
。
Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves. Optional. The default is False.