在我的程序中,我使用google-api-python-client连接到日历API。 我为事件在未来3天的查询:发生Google日历周期性事件(Python API)的时间
service = build(serviceName='calendar', version='v3', http=http)
events = service.events().list(
calendarId=calendarId,
timeMin='2013-01-04T00:00:00+01:00',
timeMax='2013-01-06T00:00:00+01:00').execute()
结果的事件列表,仿照Python字典,大致看起来像这样(我省略了一些不必要的数据):
{
u'created': u'2012-11-26T00:54:43.000Z',
u'description': u'abc abc',
u'start': {u'dateTime': u'2012-11-26T08:00:00+01:00',
u'timeZone': u'Europe/Copenhagen'},
u'end': {u'dateTime': u'2012-11-26T10:00:00+01:00',
u'timeZone': u'Europe/Copenhagen'},
u'kind': u'calendar#event',
u'recurrence': [u'RRULE:FREQ=DAILY'],
u'sequence': 0
}
上述事件是几个月前创建的循环事件,“开始”和“结束”字段反映创建日期。在结果列表中会有多个此事件的副本,因为它会在'timeMin'和'timeMax'范围之间出现好几次。
现在,问题是我没有确切发生事件的日期时间(在这种情况下应为2013-01-04T00:08:00 + 01:00)。任何人都知道我是否可以从Google Calendar API(通过python包使用版本3)获得这段时间?
或者会建议如何在客户端实现它?