#
# PUT an event with attendees
#
TYPE=PUT
URL=http://mycaldav/caldav.php/user1/home/PUT-attendees.ics
HEADER=Content-Type: text/calendar
HEADER=User-Agent: DAVKit/2.0 (10.5.1; wrbt) iCal 3.0.1
HEAD


BEGINDATA
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Apple Inc.//iCal 3.0//EN
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:Pacific/Auckland
BEGIN:STANDARD
TZOFFSETFROM:+1300
TZOFFSETTO:+1200
DTSTART:19900318T030000
RRULE:FREQ=YEARLY;UNTIL=20070317T140000Z;BYMONTH=3;BYDAY=3SU
TZNAME:NZST
END:STANDARD
BEGIN:DAYLIGHT
TZOFFSETFROM:+1200
TZOFFSETTO:+1300
DTSTART:20070930T020000
RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=-1SU
TZNAME:NZDT
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+1300
TZOFFSETTO:+1200
DTSTART:20080406T030000
RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
TZNAME:NZST
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
SEQUENCE:7
DESCRIPTION:Masses of Lunch will be needed
UID:PUT-attendees
TRANSP:OPAQUE
DTSTART;TZID=Pacific/Auckland:20101123T110000
DTEND;TZID=Pacific/Auckland:20101123T160000
DTSTAMP:20101124T221900Z
SUMMARY:Multiple Beard Meeting
CREATED:20071124T221521Z
RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=4TU
ORGANIZER;CN=User 1:MAILTO:user1@example.net
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;
 RSVP=TRUE;CN=User 1;LANGUAGE=en:MAILTO:user1@example.net
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;
 RSVP=TRUE;CN=User 2;LANGUAGE=en:MAILTO:user2@example.net
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;
 RSVP=TRUE;CN=User 3;LANGUAGE=en:MAILTO:user3@example.net
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;
 RSVP=TRUE;CN=User 4;LANGUAGE=en:MAILTO:user4@example.net
END:VEVENT
END:VCALENDAR
ENDDATA


QUERY
SELECT caldav_data.user_no, caldav_data.dav_name,
       caldav_type, logged_user, caldav_data.caldav_data AS "vcalendar",
       summary
FROM caldav_data JOIN calendar_item USING(dav_name) LEFT JOIN timezones ON (tz_id=tzid)
WHERE calendar_item.uid = 'PUT-attendees'
ORDER BY caldav_data.dav_id
ENDQUERY

