Open bachp opened 10 years ago
as well as setLocation
I'd be willing to help push an feature update, but I'm not sure what these added methods would provide? Things like setLocation are just wrappers for addProperty. You can simply do:
var properties = {
'CN' : 'Some guy:mailto:someguy@gmail.com'
}
event.addProperty('ATTENDEE', '', properties);
(btw, setLocation is NOT in the npm version of this library, you need to use the github address in package.json if you want to get the most up-to-date code)
We're using this library to generate event invitations and I also noticed a lot of addProperty
use in our code.
Having more expressive methods for this in the library would be highly appreciated. I would even go so far as to implement setters for class, priority, transparency, status and whatever else there is.
Even though these would be thin wrappers around addProperty
, I think it would be a benefit simply through being more expressive with the code you write. I'd probably be able to send a PR if there is interest in merging something like that.
+1
Attendee and organizer are typed CAL-ADDRESS. It only takes value parameter. For now, it is impossible to set ROLE or PARTSTAT etc. How can this be fixed?
@oathcomrade Try this:
event.addProperty(
"ATTENDEE", "MAILTO:" + meetingAttendee.email,
{
ROLE : "REQ-PARTICIPANT",
PARTSTAT : "NEEDS-ACTION",
RSVP : "TRUE",
CN : meetingAttendee.name.full
} );
It would be nice to be able to have a
.setAttendee()
orsetAttendees([])
and asetOrganizer()
method for Events.