fetchVCards
fetchVCards
get all/specified vcards of the passed in addressBook
const vcards = await fetchVCards({
addressBook: addressBooks[0],
headers: {
authorization: 'Basic x0C9uFWd9Vz8OwS0DEAtkAlj',
},
});
Arguments
addressBook
required, DAVAddressBook to fetch vcards fromobjectUrls
vcard urls to fetchheaders
request headersheadersToExclude
array of keys of the headers you want to excludefetchOptions
options to pass to underlying fetch functioninfosome providers may return their objects with different suffixes such as
http://api.xx/97ec5f81-5ecc-4505-9621-08806f6796a3
orhttp://api.xx/calobj1.abc
in this case, you can pass in your own object name filterurlFilter
default: 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.
useMultiGet
default: 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.