CalDAVClient icon indicating copy to clipboard operation
CalDAVClient copied to clipboard

Add $depth parameter in getCalendar request

Open infostreams opened this issue 7 years ago • 4 comments

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

infostreams avatar Mar 27 '18 10:03 infostreams

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 avatar Mar 27 '18 10:03 infostreams

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.

infostreams avatar May 17 '18 13:05 infostreams

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

smarcet avatar Jun 01 '18 20:06 smarcet

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)

infostreams avatar Jun 13 '18 14:06 infostreams