1.0.3 • Published 10 years ago

node-caldav-mod v1.0.3

Weekly downloads
18
License
MIT
Repository
github
Last release
10 years ago

node-caldav-mod

A lightweight Node.JS Caldav Client

Usage

var caldav = require("node-caldav-mod");

/**
 * Add a new event to a CalDAV calendar
 * @param {object} event - Information about the event
 * @param {string} url - CalDAV Calendar URL
 * @param {string} username - CalDAV Username
 * @param {string} password - CalDAV password
 * @param {function} callback - Callback function
 * @function
 */
caldav.addEvent(event, url, username, password, callback)

The event object needs to look like this:

const event = {
  key: "", // ID of the event, needs to be unique and can be used to edit the event in the future
  summary: "", // The title of the event
  startDate: "", // YYYYMMDDTHHmmsZ
  endDate: "", // YYYYMMDDTHHmmsZ - To create an all-day event, set endDate = startDate
}
/**
 * Get the events from a CalDAV calendar for a specific range of dates
 * @param {string} url - CalDAV Calendar URL
 * @param {string} username - CalDAV Username
 * @param {string} password - CalDAV password
 * @param {string} startDate - Date from which to start, format: YYYYMMDDTHHmmsZ (example: 20140101T120000Z)
 * @param {string} endDate - CalDAV password
 * @param {function} callback - Callback function
 * @function
 */
caldav.getEvents(url, username, password, startDate, endDate, callback)

Fork

I have forked this project because it wasn't parsing correctly my caldav XML. If you are having the same issue, feel free to use this node.js package and modify it.

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago