Skip to content

fetchVCards

get all/specified vcards of the passed in addressBook

const vcards = await fetchVCards({
addressBook: addressBooks[0],
headers: {
authorization: 'Basic x0C9uFWd9Vz8OwS0DEAtkAlj',
},
});
  • addressBook required, DAVAddressBook to fetch vcards from
  • objectUrls vcard urls to fetch
  • headers request headers
  • headersToExclude array of keys of the headers you want to exclude
  • fetchOptions options to pass to underlying fetch function
  • fetch custom fetch implementation
  • urlFilter default: no filter predicate function to filter urls from the address book before fetching
  • useMultiGet default: true whether to use addressBookMultiGet as underlying function to fetch vcards, if set to false, it will use addressBookQuery instead

array of DAVVCard

a mix of addressBookMultiGet and addressBookQuery, you can specify objectUrls here.