在哪里可以找到 Google Calendar API 的版本?

问题描述

我想将 Google Calendar API 用于我的 Android Studio 项目。我必须将它包含在我的 Gradle.File 中

someFunction()

但我在任何地方都找不到 Google Calendar Api“版本”

解决方法

该信息最有效的位置可能是发现 api,然后是指向该 api 的直接发现文件的链接

https://discovery.googleapis.com/discovery/v1/apis

哪个会给你以下信息

{
  "kind": "discovery#directoryItem","id": "calendar:v3","name": "calendar","version": "v3","title": "Google Calendar API","description": "The Google Calendar API lets you manage your calendars and events.","discoveryRestUrl": "https://calendar-json.googleapis.com/$discovery/rest?version=v3","icons": {
    "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png","x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png"
  },"documentationLink": "http://code.google.com/apis/calendar/v3/","preferred": true
},

然后,您可以仔细检查该 api 的 discoveryRestUrl。

https://calendar-json.googleapis.com/$discovery/rest?version=v3

其中包含我认为您可以在您的图书馆中使用的流动条目

"name": "calendar","version": "v3"