Skip to main content
Version: 2.1.2

calendarMultiGet

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 calendar
const 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

  • url required, url of CALDAV server
  • objectUrls required, urls of calendar object to get
  • depth required, DAVDepth of the request
  • props CALDAV prop element in ElementCompact form
  • filters CALDAV filter element in ElementCompact form
  • timezone timezone of the calendar
  • headers request headers
  • headersToExclude array of keys of the headers you want to exclude
  • fetchOptions options to pass to underlying fetch function

Return Value

array of DAVCalendarObject

Behavior

send caldav:calendar-multiget REPORT request and parse the response xml to extract an array of DAVCalendarObject data.