事件参数kind =“calendar#event”的目的是什么。在谷歌日历API中

时间:2017-09-18 15:39:15

标签: android-calendar google-calendar-api

事件参数的目的是什么

  

kind =“calendar#event”

。在google calendar API

image

参考链接 - >

https://developers.google.com/google-apps/calendar/v3/reference/events

2 个答案:

答案 0 :(得分:1)

它只是提供信息的资源标识符。

答案 1 :(得分:1)

  

集合的类型("日历#events")。

它根据documentation确定您正在使用的资源类型。

例如:

您正在从日历活动中获取数据,因此"kind"

 {
  "kind": "calendar#events",
  "etag": "\"00000000000000000\"",
  "summary": "someon@something.com",
  "updated": "2098-09-16T21:11:56.805Z",
  "timeZone": "Asia/Manila",
  "accessRole": "owner",
  "defaultReminders": [
   {
    "method": "popup",
    "minutes": 10
   }
  ]
 {...}
}

另一个例子是从日历颜色中获取数据

{
  "kind": "calendar#colors",
  "updated": "2012-02-14T00:00:00.000Z",
  "calendar": {
   "1": {
    "background": "#FFFFFF",
    "foreground": "#AAAAAA"
   },
  {...}
 }
}

上一个示例的日历列表,

{
 "kind": "calendar#calendarList",
 "etag": "\"p324cv3ddpuldc0g\"",
 "nextSyncToken": "CIjPja3PqtYCEhNhbWFnbmFiZUBnb29nbGUuY29t",
 "items": [
  {
   "kind": "calendar#calendarListEntry",
   "etag": "\"00000000000000000\"",
   "id": "AAAAABBBB_BBBB_AAA@group.calendar.something.com",
   "summary": "My summary",
   "timeZone": "UTC",
   "colorId": "1",
   "backgroundColor": "0000001",
   "foregroundColor": "#5555555",
   "selected": true,
   "accessRole": "owner",
   "defaultReminders": []
  },
 {...}
}

希望这有帮助。