calendarMultiGet
calendarMultiGet
Section titled “calendarMultiGet”calendarMultiGet is used to retrieve specific calendar object resources from within a collection.
If the Request-URI is a calendar object resource. This method is similar to the calendarQuery, except that it takes a list of calendar object urls, instead of a filter, to determine which calendar objects to return.
// fetch 2 specific objects from one calendarconst calendarObjects = await calendarMultiGet({ url: 'https://caldav.icloud.com/1234567/calendars/personal/', props: { [`${DAVNamespaceShort.DAV}:getetag`]: {}, [`${DAVNamespaceShort.CALDAV}:calendar-data`]: {}, }, objectUrls: [ 'https://caldav.icloud.com/1234567/calendars/personal/1.ics', 'https://caldav.icloud.com/1234567/calendars/personal/2.ics', ], depth: '1', headers: { authorization: 'Basic x0C9ueWd9Vz8OwS0DEAtkAlj', },});Arguments
Section titled “Arguments”urlrequired, url of CalDAV collectionpropsrequired, CALDAV prop element in ElementCompact formdepthrequired, DAVDepth of the requestobjectUrlsurls of calendar objects to getfiltersCALDAV filter element in ElementCompact formtimezonetimezone of the calendarheadersrequest headersheadersToExcludearray of keys of the headers you want to excludefetchOptionsoptions to pass to underlying fetch functionfetchcustom fetch implementation
Return Value
Section titled “Return Value”array of DAVResponse
Behavior
Section titled “Behavior”send caldav:calendar-multiget REPORT request and parse the response xml into an array of DAVResponse.