Google api 谷歌日历API-检查冲突

Google api 谷歌日历API-检查冲突,google-api,google-calendar-api,Google Api,Google Calendar Api,我正在制作一个管理约会的小应用程序——我需要知道是否有当前支持的方法来检查谷歌日历中的事件是否重叠 { "timeMax": "2017-05-25T13:44:16.549Z", "timeMin": "2017-05-20T13:44:16.549Z", "items": [ { "id": "primary" } ] } 基本上,我从应用程序创建的日历中读取事件列表,然后使用该列表填充应用程序 然后,我添加一个日历事件。我需要检查它是否与已经存

我正在制作一个管理约会的小应用程序——我需要知道是否有当前支持的方法来检查谷歌日历中的事件是否重叠

{
  "timeMax": "2017-05-25T13:44:16.549Z",
  "timeMin": "2017-05-20T13:44:16.549Z",
  "items": [
    {
      "id": "primary"
    }
  ]
}
基本上,我从应用程序创建的日历中读取事件列表,然后使用该列表填充应用程序


然后,我添加一个日历事件。我需要检查它是否与已经存在的冲突。有没有办法用他们的api做到这一点?

谷歌日历api有一个称为it的方法,基本上会返回两次之间的事件列表(如果它们存在于日历中)

{
  "timeMax": "2017-05-25T13:44:16.549Z",
  "timeMin": "2017-05-20T13:44:16.549Z",
  "items": [
    {
      "id": "primary"
    }
  ]
}
在我的主日历上申请5月20日至5月25日之间的活动

{
  "timeMax": "2017-05-25T13:44:16.549Z",
  "timeMin": "2017-05-20T13:44:16.549Z",
  "items": [
    {
      "id": "primary"
    }
  ]
}
结果

{
 "kind": "calendar#freeBusy",
 "timeMin": "2017-05-20T13:44:16.000Z",
 "timeMax": "2017-05-25T13:44:16.000Z",
 "calendars": {
  "primary": {
   "busy": [
    {
     "start": "2017-05-23T15:35:00Z",
     "end": "2017-05-23T16:35:00Z"
    },
    {
     "start": "2017-05-24T13:00:00Z",
     "end": "2017-05-24T13:30:00Z"
    }
   ]
  }
 }
}

GoogleCalendarAPI有一个名为it的方法,它基本上返回两次之间的事件列表(如果它们存在于日历中)

{
  "timeMax": "2017-05-25T13:44:16.549Z",
  "timeMin": "2017-05-20T13:44:16.549Z",
  "items": [
    {
      "id": "primary"
    }
  ]
}
在我的主日历上申请5月20日至5月25日之间的活动

{
  "timeMax": "2017-05-25T13:44:16.549Z",
  "timeMin": "2017-05-20T13:44:16.549Z",
  "items": [
    {
      "id": "primary"
    }
  ]
}
结果

{
 "kind": "calendar#freeBusy",
 "timeMin": "2017-05-20T13:44:16.000Z",
 "timeMax": "2017-05-25T13:44:16.000Z",
 "calendars": {
  "primary": {
   "busy": [
    {
     "start": "2017-05-23T15:35:00Z",
     "end": "2017-05-23T16:35:00Z"
    },
    {
     "start": "2017-05-24T13:00:00Z",
     "end": "2017-05-24T13:30:00Z"
    }
   ]
  }
 }
}