为什么这个 Google 日历 API 不请求 return 事件数据,例如开始时间?

Why does this Google Calendar API request not return event data such as start time?

我有一个 public Google 日历;我想通过 Google 的 API 使用数据并在 JavaScript 中的 front-end 上重新设计它。但是当我请求 JSON 时,数据是……奇怪的。事件没有开始或结束时间,事件标题是 HTML 编码的,objects 嵌套在“$t”键下。我认为这看起来不正确。使用日历 API 我错过了什么?

示例:http://www.google.com/calendar/feeds/dl9fj86o2ohe7o823s7jar920s@group.calendar.google.com/public/basic?orderby=starttime&sortorder=ascending&futureevents=true&alt=json

您正在调用 API v2。我可以通过 URL 判断,它与 API v3 有很大不同。根据Google Calendar API v2 Developer's Guide: Protocol

"This API is a subject to the Deprecation Policy and was shut down on November 17, 2014. Please use APIv3 instead."

我假设您正在通过浏览器地址栏中的 GET 请求查看该数据。一旦您开始尝试在 ajax 请求中使用相同的 URL,我认为您将走上一条最终导致您切换到 API V3 的道路。