@barinbritva/add-to-calendar
Version:
[](https://github.com/barinbritva/add-to-calendar/blob/master/package.json) [](https://gith
20 lines (19 loc) • 713 B
JavaScript
import { StringHelper } from '../Utils/StringHelper';
import { UrlGenerator } from './UrlGenerator';
export class Yahoo extends UrlGenerator {
constructor() {
super(...arguments);
this.urlBase = 'https://calendar.yahoo.com/';
}
convertEventToQueryObject(event) {
return {
v: '60',
title: event.title,
st: StringHelper.clearPunctuation(event.getStartDateAsString()),
et: StringHelper.clearPunctuation(event.getEndDateAsString()),
desc: event.description,
in_loc: event.locationName,
inv_list: event.hasAttendees() ? this.convertAttendeesToString(event.attendees) : undefined
};
}
}