Skip to content

Conversation

@infostreams
Copy link
Contributor

This allows the user to retrieve all the objects in the calendar.

This allows the user to retrieve all the objects in the calendar.
@infostreams
Copy link
Contributor Author

This is the (I believe) only 'proper' way to get a list of all the objects in a calendar. This is the way that the Mac Calendar app does it. I checked by installing mitmproxy and observing the requests.

You can do a filter query too, but then recurring events are probably included more than once (I think), and you can't be sure that you have everything. You can obviously set humongous time ranges (say 1-1-1800 to 1-1-2200), but that's code smell and I don't like code smell.

Unfortunately, this means that the getCalendarResponse is now a multiresponse (as it implicitly already was), so any existing code might break. The alternative is to keep it as a fake single response as to not break any code, and to introduce a new class to cover this use case, but that's probably code smell as well...

@infostreams
Copy link
Contributor Author

I thought this worked, but it didn't. Apologies. I didn't add the 'multiresponse' layer that was necessary; without it my GetCalendars() calls would come back empty.

@smarcet
Copy link
Owner

smarcet commented Jun 1, 2018

ok no problem i will take a look asap thx ! :)

@infostreams
Copy link
Contributor Author

Code was still broken, but I got the tests running on my machine. However, that was before Github told me there's a merge conflict with the master branch - which I resolved in the browser, so I couldn't test if the tests are still running. Think they will, though (it was only a minor change)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants