google-calendar-api的service.events()。list的最早数据是哪个日期?

时间:2019-01-31 06:12:58

标签: python google-api google-calendar-api

我使用google-calendar-api的service.events()。list获取数据,这是我的代码的一部分:

  paraAgoDate='2019-01-01'
  UTCStartTime = 'T15:00:00.000Z'
  events_result = service.events().list(calendarId=calendarId,
                                                      orderBy='updated',
                                                      showHiddenInvitations=True,
                                                      showDeleted=True,
                                                      updatedMin = paraAgoDate + UTCStartTime 
                                                      ).execute()

但是当我运行代码时,错误消息是:

  

googleapiclient.errors.HttpError:https://www.googleapis.com/calendar/v3/calendars/zhang_xueyuan%40c.tre-inc.com/events?orderBy=updated&showHiddenInvitations=true&showDeleted=true&updatedMin=2019-01-01T15 %3A00%3A00.000Z&alt = json返回“请求的最小修改时间过去太久了。“>

设置paraAgoDate='2019-01-02'时没有错误。

今天是'2019-01-31',我想知道google-calendar-api的service.events()。list的最早数据是什么日期?

1 个答案:

答案 0 :(得分:1)

data.table

表示您设置的日期超出了API的允许范围。 UpdatedMin必须在最近三十天内。这没有记录,但是您可以对其进行测试。我已将文档错误提交给Google

https://issuetracker.google.com/issues/123651518