-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
feat(ocp): calendar event builder api #49888
base: master
Are you sure you want to change the base?
Conversation
@nickvergessen This should get you started for the meetings feature. Let me know if you have questions. |
I added a example on how to use the |
3132ecd
to
b9fbef9
Compare
3e6899c
to
ce5b8a8
Compare
Signed-off-by: Richard Steinmetz <[email protected]>
ce5b8a8
to
80bc1c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, will implement Talk's side now
use OCP\Calendar\Exceptions\CalendarException; | ||
|
||
/** | ||
* The calendar event builder can be used to conveniently build a calendar event and then serialize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit Could mention that it's not injectable and to get it from {@see IManager::createEventBuilder}
?
@@ -334,3 +334,7 @@ License: CC0-1.0 | |||
Files: apps/theming/fonts/OpenDyslexic-Bold.otf apps/theming/fonts/OpenDyslexic-Regular.otf | |||
Copyright: 2012-2019 Abbie Gonzalez <https://abbiecod.es|[email protected]>, with Reserved Font Name OpenDyslexic. | |||
License: OFL-1.1-RFN | |||
|
|||
Files: tests/data/ics/event-builder-complete.ics tests/data/ics/event-builder-without-attendees.ics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit should be in a tests/data/ics/event-builder-complete.ics.license
file next to it (this way it's dropped when shipping)
* @throws InvalidArgumentException If required properties were not set | ||
* @throws CalendarException If writing the event to the calendar fails | ||
*/ | ||
public function createInCalendar(ICreateFromString $calendar): string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Talk we would fed an entry of IManager::getCalendarsForPrincipal()
into this, but those are ICalendar
not ICreateFromString
(which extends it).
Do you need that detail, or could we relax the API?
return $this; | ||
} | ||
|
||
public function setSummary(string $summary): ICalendarEventBuilder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a max length that we should check, or does caldav take care of that, same for description?
Summary
The event builder API is done and ready to use.
Code example
TODO
Actually implement the availability API(ref Schedule meetings inside Talk calendar#6516 (comment))Checklist