ics-service

Create a calendar feed people can subscribe to.

Usage no npm install needed!

<script type="module">
  import icsService from 'https://cdn.skypack.dev/ics-service';
</script>

README

ics-service

Create a calendar feed people can subscribe to.

npm version build status ISC-licensed minimum Node.js version support me via GitHub Sponsors chat with me on Twitter

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 GENERATOR = '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: GENERATOR,
}, {
    uid: 'b',
    title: 'B', description: 'B.',
    start: ['2020', '09', '09', '09', '09'],
    duration: {hours: 0, minutes: 45},
    status: 'CONFIRMED',
    sequence: 2,
    productId: GENERATOR,
}]

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.