Hi Tom, --On June 24, 2008 2:27:35 PM -0700 Tom Roli <caricatureproductions@yahoo.com> wrote:
I am new to the list and the calendar server. I am working in PHP and need to find a way to download a users calendar (so I can use the information).
Currently, I am able to access a users entire calendar with the following request:
/usr/bin/curl -X GET http://<server>/calendars/users/<username>/<calendar>/ -u <username>:<password> --digest -o <file location>
This works great for my needs, but there can be a lot of data to parse through.
1. Is there a way to use this method to request a single day's .ics data?
2. Is there a way to retrieve a single week or month?
3. Can only events or todos be downloaded?
Anyway, thank you for your time.
Yes you can query for events, including time-ranges. To do that you need to use the CalDAV calendar-query REPORT method as defined in the CalDAV spec (rfc4791) and target your request at the calendar collection. If you look at the spec you will see an example of a report that will do a basic time-range query. You should be able to get curl to generate that report with an xml body that you supply with the appropriate time-range data. You will then need to parse the resulting XML to extract the events you want. -- Cyrus Daboo