【发布时间】:2019-09-18 17:17:23
【问题描述】:
我正在尝试使用 Google Calendar API list 以编程方式访问我拥有的日历:
r = requests.get(
url="https://www.googleapis.com/calendar/v3/calendars/<the ID of my calendar which looks like mydomain_randomstuff@group.calendar.google.com>/events",
params={
'key': <the key from the API console>,
'singleEvents': True,
'orderBy': 'startTime'
}
此调用失败并返回 404:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
在此 API 的上下文中,该错误实际上意味着什么?
注意:
- 日历确实存在,并且有事件
- 甚至还没有达到 API 限制
【问题讨论】:
-
????我猜这段代码是 JavaScript,如果不是,请使用您使用的正确编程语言修复标签。
-
@DaImTo:我删除了 JS 标签,因为问题与任何特定语言无关,而是与 API 相关。我在示例中使用了 Python,但没关系
-
这看起来不像 google api python 客户端库中的代码,但我的 python 知识有限。
-
@DaImTo: 不,这是一个
requests调用,它是Python中HTTP调用的实现(类似于JS中的fetch,因为你提到了它——只是同步的)
标签: google-api google-calendar-api