$ cnpm install kalender-events
This Node module gets the events from an ical-URL, a caldav-server or from the iCloud.
For bug reports and feature requests, open issues. :bug:
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:
3KDjCmXsGFYawmycXRsVwfFbphog117N8P
Thanks! :heart:
$ npm install kalender-events
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
:warning: If you are using iCloud: Have a look here: wiki/Get-iCloud-secure-URL
arraylist of upcoming events.
properties:
- date
- summary
- event
- eventStart
- eventEnd
- description
- id
- allDay
- rule
- location
//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 }
}
]
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:
Copyright 2014 - 2016 © taobao.org |