简体   繁体   中英

Google calendar recurring events get only exceptions from pattern

Is there a way to get recurring events exceptions? For example I have a Google recurring event with no end date, and the user made an exception on one instance. In theory there is a countless number of instances. Is it possible to get only those that are changed? How to detect only changed instances?

This is needed for syncing with Outlook (in Outlook there is the possibility to get only exceptions from the rule).

Fetching google events with option singleEvent = true could return countless instances?

在Outlook对象模型中,RecurrencePattern对象公开了Exceptions集合-请参阅https://msdn.microsoft.com/zh-cn/library/office/ff869544.aspx

If you give singleEvents="true", it gives all the instances of a recurring event in events.list. When you want to get only the exception, then in events.list don't give singleEvents="true", then you will find only recurring event(with out instances) and the exception too.

Here is the sample response. I tried in API explorer :

 summary": "Test recu",//recurring event
 "creator": {
  "email": "xxxx@gmail.com",
 "displayName": "xxxxx",
 "self": true
},
"organizer": {
"email": "xxxx@gmail.com",
"displayName": "xxxx",
"self": true
 },
   "start": {
 "dateTime": "2015-08-28T09:30:00-07:00",
"timeZone": "America/Los_Angeles"
 },
"end": {
 "dateTime": "2015-08-28T10:30:00-07:00",
"timeZone": "America/Los_Angeles"
   },
     "recurrence": [
    "RRULE:FREQ=WEEKLY;BYDAY=TH,FR"


summary": "Test recu",//changed instance that is exception
"creator": {
"email": "xxxx@gmail.com",
"displayName": "xxxx",
"self": true
},
"organizer": {
"email": "xxxx@gmail.com",
"displayName": "xxxx",
"self": true
},
"start": {
"dateTime": "2015-09-03T10:00:00-07:00",
"timeZone": "America/Los_Angeles"
},
"end": {
"dateTime": "2015-09-03T11:00:00-07:00",
"timeZone": "America/Los_Angeles"
},

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM