Miss any of our Open RFC calls?Watch the recordings here! »

ics-service

1.1.0 • Public • Published

ics-service

Create a calendar feed people can subscribe to.

npm version build status ISC-licensed minimum Node.js version chat with me on Gitter support me on Patreon

Installation

npm install ics-service

Usage

const express = require('express')
const generateIcs = require('ics-service/generate-ics')
const aboutRoute = require('ics-service/about')
const feedRoute = require('ics-service/feed')
 
const title = 'some calendar feed'
const productId = 'my feed generator'
const events = [{
    uid: 'a', title: 'A', description: 'A.',
    location: 'Alamo Square, San Francisco, CA',
    url: 'https://example.org/',
    geo: {lat: 37.774703, lon: -122.432642, radius: 20},
    categories: ['event'],
    start: ['2020', '08', '08', '08', '08'],
    duration: {hours: 1, minutes: 30},
    status: 'CONFIRMED',
    sequence: 1,
    productId,
}, {
    uid: 'b',
    title: 'B', description: 'B.',
    start: ['2020', '09', '09', '09', '09'],
    duration: {hours: 0, minutes: 45},
    status: 'CONFIRMED',
    sequence: 2,
    productId,
}]
 
const getIcs = feedUrl => generateIcs(TITLE, events, feedUrl)
 
const app = express()
app.use('/feed', feedRoute(getIcs))
app.use('/', aboutRoute(TITLE))

Contributing

If you have a question or need support using ics-service, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, use the issues page.

Install

npm i ics-service

DownloadsWeekly Downloads

0

Version

1.1.0

License

ISC

Unpacked Size

8.88 kB

Total Files

8

Last publish

Collaborators

  • avatar