Tsdav

WebDAV, CALDAV, and CARDDAV client for Nodejs and the Browser
Alternatives To Tsdav
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Filestash7,958121 hours ago4June 23, 202152agpl-3.0JavaScript
🦄 A modern web client for SFTP, S3, FTP, WebDAV, Git, Minio, LDAP, CalDAV, CardDAV, Mysql, Backblaze, ...
Dav1,36930453a month ago121June 27, 2022218bsd-3-clausePHP
sabre/dav is a CalDAV, CardDAV and WebDAV framework for PHP
Vdirsyncer1,2904210 days ago63June 13, 2021162otherPython
📇 Synchronize calendars and contacts.
Davx5 Ose669
3 days agogpl-3.0Kotlin
DAVx⁵ is an open-source CalDAV/CardDAV suite and sync app for Android. You can also access your online files (WebDAV) with it.
Xandikos288
6 days ago57gpl-3.0Python
A CalDAV/CardDAV server
Dav25223172 years ago28August 11, 201851mpl-2.0JavaScript
WebDAV, CalDAV, and CardDAV client for nodejs and the browser.
Davis193
a month ago4mitPHP
🗓 A simple, fully translatable admin interface for sabre/dav based on Symfony 5 and Bootstrap 4, largely inspired by Baïkal.
Tine20148
6 days ago1,280agpl-3.0HTML
Tine 2.0 main repository
Tsdav12143 months ago22July 03, 202223mitTypeScript
WebDAV, CALDAV, and CARDDAV client for Nodejs and the Browser
Webdavserversamples45
15 days agoTSQL
WebDAV, CalDAV & CardDAV server examples in C# and VB based on IT Hit WebDAV Server Engine for .NET
Alternatives To Tsdav
Select To Compare


Alternative Project Comparisons
Readme

webdav request made easy

Bundlephobia Types NPM Version MIT License

Features

  • Easy to use, well documented JSON based WEBDAV API
  • Works in both Browsers and Node.js
  • Supports Both commonjs and esm
  • OAuth2 & basic auth helpers built-in
  • Native typescript, fully linted and well tested
  • Supports WEBDAV, CALDAV, CARDDAV
  • Tested with multiple cloud providers

Install

npm install tsdav

or

yarn add tsdav

Quickstart

Google CALDAV
import { createDAVClient } from 'tsdav';

(async () => {
  const client = await createDAVClient({
    serverUrl: 'https://apidata.googleusercontent.com/caldav/v2/',
    credentials: {
      tokenUrl: 'https://accounts.google.com/o/oauth2/token',
      username: 'YOUR_EMAIL_ADDRESS',
      refreshToken: 'YOUR_REFRESH_TOKEN_WITH_CALDAV_PERMISSION',
      clientId: 'YOUR_CLIENT_ID',
      clientSecret: 'YOUR_CLIENT_SECRET',
    },
    authMethod: 'Oauth',
    defaultAccountType: 'caldav',
  });

  const calendars = await client.fetchCalendars();

  const calendarObjects = await client.fetchCalendarObjects({
    calendar: calendars[0],
  });
})();
Apple CARDDAV
import { createDAVClient } from 'tsdav';

(async () => {
  const client = await createDAVClient({
    serverUrl: 'https://contacts.icloud.com',
    credentials: {
      username: 'YOUR_APPLE_ID',
      password: 'YOUR_APP_SPECIFIC_PASSWORD',
    },
    authMethod: 'Basic',
    defaultAccountType: 'carddav',
  });

  const addressBooks = await client.fetchAddressBooks();

  const vcards = await client.fetchVCards({
    addressBook: addressBooks[0],
  });
})();

After v1.1.0, you have a new way of creating clients.

Google CALDAV
import { DAVClient } from 'tsdav';

const client = new DAVClient({
  serverUrl: 'https://apidata.googleusercontent.com/caldav/v2/',
  credentials: {
    tokenUrl: 'https://accounts.google.com/o/oauth2/token',
    username: 'YOUR_EMAIL_ADDRESS',
    refreshToken: 'YOUR_REFRESH_TOKEN_WITH_CALDAV_PERMISSION',
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
  },
  authMethod: 'Oauth',
  defaultAccountType: 'caldav',
});

(async () => {
  await client.login();

  const calendars = await client.fetchCalendars();

  const calendarObjects = await client.fetchCalendarObjects({
    calendar: calendars[0],
  });
})();
Apple CARDDAV
import { DAVClient } from 'tsdav';

const client = new DAVClient({
  serverUrl: 'https://contacts.icloud.com',
  credentials: {
    username: 'YOUR_APPLE_ID',
    password: 'YOUR_APP_SPECIFIC_PASSWORD',
  },
  authMethod: 'Basic',
  defaultAccountType: 'carddav',
});

(async () => {
  await client.login();

  const addressBooks = await client.fetchAddressBooks();

  const vcards = await client.fetchVCards({
    addressBook: addressBooks[0],
  });
})();

Documentation

Check out the Documentation

License

MIT

Changelog

refers to Changelog

Debugging

this package uses debug package, add tsdav:* to DEBUG env variable to enable debug logs

Popular Caldav Projects
Popular Webdav Projects
Popular Applications Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Typescript
Calendar
Contacts
Webdav
Ical
Vcard
Caldav