tsdav
tsdav copied to clipboard
fetchVCards returns empty array
Hi,
our company have carddav/caldav service. It works fine with Thunderbird, Outlook, even Android open Sync. But I can not fetch any contacts or even calendar events from it with tsdav. I can not obviously provide credentials, but I can give you an url to the service in the example below.
I am able to fetch address books with fetchAddressBooks method, but fetchVCards returns empty array.
My code:
import { DAVClient } from 'tsdav';
const client = new DAVClient({
serverUrl: 'https://carddav.seznam.cz',
credentials: {
username: '...',
password: '...',
},
authMethod: 'Basic',
defaultAccountType: 'carddav',
});
(async () => {
await client.login();
// I get 2 books, that is OK.
const addressBooks = await client.fetchAddressBooks();
// Empty []
const vcards = await client.fetchVCards({
addressBook: addressBooks[0],
});
console.log(vcards);
})();
current vcard support is not perfect, but I cannot help you with private endpoints since there's no way I would be able to test them, maybe you can test by combining the underlying functions like addressBookQuery and addressBookMultiGet to find the problem.