0.1.0 • Published 3 years ago

@barinbritva/event-link-generator v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

📅 Event Link Generator

Dependencies counter License

Generate event links to add them to a calendar.

Supported services: Outlook, Office365, Google and Yahoo. You are also able to use ICalendar to create downloadable links to ics files.

🚀 Getting started

Install package:

npm install --save @barinbritva/event-link-generator

Import entities:

import {Event, Outlook, Google, MultiGenerator} from '@barinbritva/event-link-generator'

Create an event:

const event = new Event(
  'Meet with friends',
  new Date(2021, 5, 18, 15, 00),
  new Date(2021, 5, 18, 17, 00),
  'It\'s Bill\'s birthday today!',
  'Blue Bottle Coffee, 300 S Broadway, Los Angeles'
)

Create link by link:

const outlookLink = new Outlook().createLink(event)
const googleLink = new Google().createLink(event)

console.log(outlookLink, googleLink)

Create a bunch of links:

// Create generators you are going to use
// Key names doesn't matter, it's up to you
const generators = {
  outlook: new Outlook(),
  office365: new Office365(),
  google: new Google(),
  yahoo: new Yahoo(),
  ics: new ICalendar()
}

const multiGenerator = new MultiGenerator(generators);

// Object of keys/values - key => link
const linksObject = multiGenerator.createLinks(event)
// Array (tuple) of pairs key/link - [key, link][]
const array = multiGenerator.createLinks(event, true)

🐛 Wellknown issues

  • Yahoo does not work properly with UTC timezone. Currently looking if there are any workarounds.

💡 Guides

  • Event API. Read how to create and manage events.
  • Date creation. Avoiding troubles with time zones. (Coming soon)

🔙 Feedback

Your feedback is really important for the project. Please, use contacts from my profile to send your questions, suggestions, help requests and others. Also, feel free to use issues section to report bugs and problems.

🌟 Credits


MIT, see LICENSE for the details.

0.1.0

3 years ago