addressBookMultiGet
addressBookMultiGet
Section titled “addressBookMultiGet”addressBookMultiGet is used to retrieve specific address object resources from within a collection.
If the Request-URI is an address object resource. This report is similar to the addressBookQuery except that it takes a list of vcard urls, instead of a filter, to determine which vcards to return.
// fetch 2 specific vcards from one addressBookconst vcards = await addressBookMultiGet({ url: 'https://contacts.icloud.com/1234567/carddavhome/card/', props: { [`${DAVNamespaceShort.DAV}:getetag`]: {}, [`${DAVNamespaceShort.CARDDAV}:address-data`]: {}, }, objectUrls: [ 'https://contacts.icloud.com/1234567/carddavhome/card/1.vcf', 'https://contacts.icloud.com/1234567/carddavhome/card/2.vcf', ], depth: '1', headers: { authorization: 'Basic x0C9ueWd9Vz8OwS0DEAtkAlj', },});Arguments
Section titled “Arguments”urlrequired, url of CardDAV collectionobjectUrlsrequired, urls of vcards to getpropsrequired, CARDDAV prop element in ElementCompact formdepthrequired, DAVDepth of the requestheadersrequest 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 carddav:addressbook-multiget REPORT request and parse the response xml into an array of DAVResponse.