fetchVCards
fetchVCards
get all/specified vcards of the passed in addressBook
const vcards = await fetchVCards({
addressBook: addressBooks[0],
headers: {
authorization: 'Basic x0C9uFWd9Vz8OwS0DEAtkAlj',
},
});
Arguments
addressBookrequired, DAVAddressBook to fetch vcards fromobjectUrlsvcard urls to fetchheadersrequest headersheadersToExcludearray of keys of the headers you want to excludefetchOptionsoptions to pass to underlying fetch functioninfosome providers may return their objects with different suffixes such as
http://api.xx/97ec5f81-5ecc-4505-9621-08806f6796a3orhttp://api.xx/calobj1.abcin this case, you can pass in your own object name filterurlFilterdefault: no filterpredicate function to filter urls from the address book before fetchinginfosome providers may not support addressBookMultiGet, then it's necessary to use addressBookQuery to fetch vcards.
useMultiGetdefault: true whether to use addressBookMultiGet as underlying function to fetch vcards, if set to false, it will use addressBookQuery instead
Return Value
array of DAVVCard
Behavior
a mix of addressBookMultiGet and addressBookQuery, you can specify objectUrls here.