将Freebusy用于除“主日历”之外的其他日历

2024-04-28 15:04:00 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在为非主日历创建事件,我要检查用户是否在此日历中不忙,而不是此事件的主日历。在

我的疑问:

the_datetime = tz.localize(datetime.datetime(2016, 1, 3, 0))
the_datetime2 = tz.localize(datetime.datetime(2016, 1, 4, 8))
body = {
        "timeMin": the_datetime.isoformat(),
        "timeMax": the_datetime2.isoformat(),
        "timeZone": 'US/Central',
        "items": [{"id": 'my.email@gmail.com'}]
       }
eventsResult = service.freebusy().query(body=body).execute()

它返回:

^{pr2}$

即使我在X日历中为该日期创建了一些内容,但当我在主日历中创建事件时,我有:

^{3}$

有没有办法告诉API我要检查的日历?在


Tags: thedatetime检查用户事件itemsbodytzus