kalender-events
calendar events for nodejs
Last updated 3 months ago by naimo84 .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install kalender-events 
SYNC missed versions from official npm registry.

kalender-events (ka'lɛndɐ, german for calendar)

This Node module gets the events from an ical-URL, a caldav-server or from the iCloud.

:question: Get Help

For bug reports and feature requests, open issues. :bug:

:sparkling_heart: Support my projects

I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).

However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:

  • Starring and sharing the projects you like :rocket:
  • PayPal PayPal— You can make one-time donations via PayPal. I'll probably buy a coffee tea. :tea:
  • Support me on using Brave Browser Brave— It's free for you. Brave is a browser that improves the security and the access time of websites by blocking ads, trackers and scripts. Give the new Brave Browser a try and Brave will contribute to me on your behalf. :wink:
  • ko-fi Ko-fi— I'll buy a tea coffee. :coffee: :wink:
  • Bitcoin—You can send me bitcoins at this address (or scanning the code): 3KDjCmXsGFYawmycXRsVwfFbphog117N8P

Thanks! :heart:

:cloud: Installation

$ npm install kalender-events

:yum: How to contribute

Have an idea? Found a bug? See how to contribute.

git clone https://github.com/naimo84/kalender-events.git
cd kalender-events
npm install
gulp
cd /your/project/path
npm install /path/to/kalender-events

:memo: Documentation

INPUT

  • url: string (URL to Calendar)
  • language: string (if dates are replaced with names, the following languages are available at the moment Deutsch, English, русский, polski, Nederlands, français, Italiano, Espanol)
  • replacedates: boolean (Dates are formated in a readable way, like today, tommorrow, in 3 weeks,...)
  • type: string (ical, icloud, caldav). default is ical
  • username: string (optional)
  • password: string (optional)
  • calendar: string (Name of the caldav calendar)
  • filter: string, Regex to filter for
  • trigger: string (always, match, nomatch)
  • preview: number
  • previewUnits: string (seconds, minutes, hours, days)
  • pastview: number
  • pastviewUnits: string (seconds, minutes, hours, days)

:warning: If you are using iCloud: Have a look here: wiki/Get-iCloud-secure-URL

OUTPUT

arraylist of upcoming events.
properties:

-   date
-   summary
-   event
-   eventStart
-   eventEnd
-   description
-   id
-   allDay
-   rule
-   location

Example:

//Typescript - index.ts

import { KalenderEvents } from "kalender-events";

const ev = new KalenderEvents({
    url: "https://calendar.google.com/calendar/ical/xxx%40group.calendar.google.com/private-xxx/basic.ics"
});

ev.getEvents({
    type: 'ical',
    preview: 10,
    previewUnits:'days',
    pastview: 10,
    pastviewUnits:'days'
}).then(data => {
    console.log(data);
})

or

//Javascript - index.js

var kalender_events = require("kalender-events");
var ev = new kalender_events.KalenderEvents({
    url: "https://calendar.google.com/calendar/ical/xxx%40group.calendar.google.com/private-xxx/basic.ics"
});

ev.getEvents({
    type: 'ical',
    preview: 10,
    previewUnits: 'days',
    pastview: 10,
    pastviewUnits: 'days'
}).then(function (data) {
    console.log(data);
});

output:

$ tsc index.ts
$ node .\index.js
[
  {
    date: '02.05.2020 10:00',
    event: 'test',
    summary: 'test',
    topic: 'test',
    calendarName: undefined,
    eventStart: 2020-05-02T07:00:00.000Z,
    eventEnd: 2020-05-02T08:00:00.000Z,
    description: '',
    id: '123@google.com',
    allDay: false,
    rule: ' ',
    location: '',
    countdown: { days: -1, hours: -7, minutes: -26, seconds: -38 }
  }
]

:scroll: The MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Coded with :heart: in :cloud:

Current Tags

  • 0.1.3                                ...           latest (3 months ago)

9 Versions

  • 0.1.3                                ...           3 months ago
  • 0.1.2                                ...           3 months ago
  • 0.1.0                                ...           7 months ago
  • 0.0.6                                ...           7 months ago
  • 0.0.5                                ...           7 months ago
  • 0.0.4                                ...           7 months ago
  • 0.0.3                                ...           7 months ago
  • 0.0.2                                ...           7 months ago
  • 0.0.1                                ...           7 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (15)
Dev Dependencies (18)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |