-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add attendees? #131
Comments
For now, Datebook doesn't have an elegant way of adding attendees (though this will change in a future version). However, here's how you'd accomplish it using the library: iCalendarFor iCalendar, you'll need to use Example: const icalendar = (new ICalendar(options))
.addProperty('ATTENDEE;ROLE=REQ-PARTICIPANT;CN=John Doe', 'MAILTO:[email protected]')
.addProperty('ATTENDEE;ROLE=OPT-PARTICIPANT;CN=Jane Doe', 'MAILTO:[email protected]')
.render() Optional Parameters:
Outlook Web CalendarFor OWA, you'll need to add the Example: let outlookWeb = (new OutlookCalendar(options)).render()
outlookWeb += `&to=John Doe <[email protected]>,Jane Doe <[email protected]>&cc=Billy Joel <[email protected]>` Google CalendarFor Google Calendar, you'll need to add the Example: let googleCalendar = (new GoogleCalendar(options)).render()
googleCalendar += `&add=John Doe <[email protected]>,Jane Doe <[email protected]>` Yahoo CalendarFor Yahoo Calendar, you'll need to add the Example: let yahooCalendar = (new YahooCalendar (options)).render()
yahooCalendar += `&inv_list=John Doe <[email protected]>,Jane Doe <[email protected]>` |
Josh and I spoke about this earlier. I will take a crack at it. Should be able to submit a PR today or tomorrow. |
If I add 2 people for ics - I am still missing the second person |
@rvmladenov what does your code look like? This fiddle shows the two attendees added when rendered: const { ICalendar } = window.datebook
const ics = new ICalendar({
title: 'Happy Hour',
location: 'The Bar, New York, NY',
description: 'Let\'s blow off some steam with a tall cold one!',
start: new Date('2022-07-08T19:00:00'),
end: new Date('2022-07-08T23:30:00'),
// an event that recurs every two weeks:
recurrence: {
frequency: 'WEEKLY',
interval: 2
}
})
.addProperty('ATTENDEE;ROLE=REQ-PARTICIPANT;CN=John Doe', 'MAILTO:[email protected]')
.addProperty('ATTENDEE;ROLE=OPT-PARTICIPANT;CN=Jane Doe', 'MAILTO:[email protected]')
.render()
console.log('ICS data: ', ics) Output
|
Just wanted to give a little update, I know I said I'd have something in on Thursday or Friday. Life, ya know? Anyway, I'm currently implementing attendees for each calendar type. The query string types are pretty trivial, but the ICal type is a little tricky. On first blush, it looks like it may need a refactor, but it might not be necessary. It's doable, I may submit the full functionality for ICal separately. |
Add an array of CalendarAttendee objects to each calendar type which describes attendee name, email, and ICS-specific options implement jshor#131
Adds an array of CalendarAttendee objects to each calendar type which describes attendee name, email, and ICS-specific options. Implements jshor#131
Adds an array of CalendarAttendee objects to each calendar type which describes attendee name, email, and ICS-specific options. Implements #131
Hi. I need to add attendees to the event. Does that library support it?
The text was updated successfully, but these errors were encountered: