-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
current and next meeting #259
Comments
EWS does not allow restrictions in combination with a calendar view, and the calendar view only accepts a start and end datetime. So you need to do the filtering client-side: def matches_some_condition(item):
# Return True here if the item matches your requirements
return len(item.subject) > 17
matching_items = filter(matches_some_condition, account.calendar.view(...)) |
Also, the |
To get the current and next meeting, I would probably just fetch a healthy chunk of the calendar and check the first two items: current_meeting, next_meeting = None, None
now = UTC_NOW()
for item in account.calendar.view(start=now, end=now + timedelta(days=7), max_items=2):
if item.start <= now and item.end >= now:
current_meeting = item
else:
next_meeting = item |
Hi,
Ive been this kind of code for a while now, to retrieve the current and next meetings of a bunch of meeting rooms in a roomlist:
But now I noticed that the recurring meetings where not being displayed in this way. And I read that the calendar.view method does show these.
Now I wanna change to the calendar.view method of getting the meetings, but since the filter option does not work on this, I can't find a way how to filter this to a current and next meeting
Is there an easy way to filter with the calandar.view? I tried things like adding the filter in the start & end parameters but this doesn't seem to have the same effect as the filter() function.
The text was updated successfully, but these errors were encountered: