0

我曾经通过以下 API 调用使用日历 ID 获取日历名称:

https://www.googleapis.com/calendar/v3/calendars/877rak5vqdsj68q52tehukeopg@group.calendar.google.com

然后我得到一个回应

{
 """"kind"""": """"calendar#calendar"""",
 """"etag"""": """"\""""ULsH1YPfrSsaWJsYynxh4efocZw/z3mgue7ZR46jHMp-7DrpcXUmmDY\"""""""",
 """"id"""": """"877rak5vqdsj68q52tehukeopg@group.calendar.google.com"""",
 """"summary"""": """"HELLO"""",
 """"description"""": """"HELLO"""",
 """"timeZone"""": """"UTC"""",
 """"conferenceProperties"""": {
 """"allowedConferenceSolutionTypes"""": [
 """"eventHangout""""
   ]
  }
}

现在我怎么能知道这个日历的状态,它是否通过谷歌日历 API 被删除。请帮我。

4

1 回答 1

0

如果您要检查CalendarList,日历资源有一个属性 deleted ,如果它被删除,它可以有一个布尔值。

{
  "kind": "calendar#calendarListEntry",
  "etag": etag,
  "id": string,
  "summary": string,
  "description": string,
  "location": string,
  "timeZone": string,
  "summaryOverride": string,
  "colorId": string,
  "backgroundColor": string,
  "foregroundColor": string,
  "hidden": boolean,
  "selected": boolean,
  "accessRole": string,
  "defaultReminders": [
    {
      "method": string,
      "minutes": integer
    }
  ],
  "notificationSettings": {
    "notifications": [
      {
        "type": string,
        "method": string
      }
    ]
  },
  "primary": boolean,
  "deleted": boolean,
  "conferenceProperties": {
    "allowedConferenceSolutionTypes": [
      string
    ]
  }
}

希望这可以帮助。

于 2018-01-06T15:44:01.667 回答