All Projects → natelindev → tsdav

natelindev / tsdav

Licence: MIT License
WebDAV, CALDAV, and CARDDAV client for Nodejs and the Browser

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to tsdav

davx5-ose
DAVx⁵ is an open-source CalDAV/CardDAV suite and sync app for Android. You can also access your online files (WebDAV) with it.
Stars: ✭ 160 (+384.85%)
Mutual labels:  contacts, caldav, webdav, calendars, carddav
calcardbackup
calcardbackup: moved to https://codeberg.org/BernieO/calcardbackup
Stars: ✭ 67 (+103.03%)
Mutual labels:  caldav, vcard, carddav, addressbook
Vdirsyncer
📇 Synchronize calendars and contacts.
Stars: ✭ 872 (+2542.42%)
Mutual labels:  sync, calendar, contacts, webdav
laravel-vcard
A fluent builder class for vCard files.
Stars: ✭ 29 (-12.12%)
Mutual labels:  contacts, vcard, contact
csv2vcf
🔧 Simple script in python to convert CSV files to VCF
Stars: ✭ 66 (+100%)
Mutual labels:  contacts, vcard, contact
mindav
A self-hosted file backup server which bridges WebDAV protocol with @minio written in @totoval. Webdav ❤️ Minio
Stars: ✭ 64 (+93.94%)
Mutual labels:  sync, webdav
laravel-sabre
Sabre.io DAV server adapter for Laravel
Stars: ✭ 33 (+0%)
Mutual labels:  caldav, dav
modoboa-radicale
The Radicale frontend of Modoboa
Stars: ✭ 18 (-45.45%)
Mutual labels:  calendar, carddav
ical
📅 Golang iCalendar lexer/parser implementing RFC 5545
Stars: ✭ 28 (-15.15%)
Mutual labels:  calendar, ical
THCalendar
Calendar like iOS
Stars: ✭ 21 (-36.36%)
Mutual labels:  calendar, ical
every2cal
🙌에브리타임 캘린더를 ics파일로 바꿔줍니다
Stars: ✭ 33 (+0%)
Mutual labels:  calendar, ical
go-vcard
A Go library to parse and format vCard
Stars: ✭ 87 (+163.64%)
Mutual labels:  contacts, vcard
add2calendar
📆 Allow you to add event to calendar easier
Stars: ✭ 51 (+54.55%)
Mutual labels:  calendar, ical
node-red-contrib-ical-events
Node-RED module to get events from a iCal Calender (Google e.g.), icloud or Caldav Server via kalender-events
Stars: ✭ 38 (+15.15%)
Mutual labels:  caldav, ical
taskwarrior-syncall
Synchronization between Taskwarrior tasks and services such as Google Calendar, Notion and Google Keep. Formerly taskw_gcal_sync
Stars: ✭ 151 (+357.58%)
Mutual labels:  sync, calendar
thymeflow
Installer for Thymeflow, a personal knowledge management system.
Stars: ✭ 27 (-18.18%)
Mutual labels:  calendar, contacts
Floccus
☁️ Sync your bookmarks privately across browsers
Stars: ✭ 2,630 (+7869.7%)
Mutual labels:  sync, webdav
Outlookgooglecalendarsync
Sync your Outlook and Google calendars
Stars: ✭ 1,113 (+3272.73%)
Mutual labels:  sync, calendar
Calendarsyncplus
This utility synchronizes Calendar entries between different calendar providers (Apps like Outlook,Services EWS/Google/Live).
Stars: ✭ 80 (+142.42%)
Mutual labels:  sync, calendar
Daylight-Calendar-ICS
Daylight Calendar is a dynamically generated .ics calendar that you can host and subscribe to in Google Calendar, iCal, or other calendar software.
Stars: ✭ 22 (-33.33%)
Mutual labels:  calendar, ical

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].