Your entire calendar can be accessed read/write via a url like
https://mail.example.com/home/dcorbe...lendar?fmt=ics
Actually implementing caldav is a wee bit more complicated.
Useful definitions: iCalendar is just a data format. libical can read and write that format. CalDAV is a complicated set of protocols for multiuser manipulation of iCalendar data over a network. MacOS Leopard included the first mainstream implementation of same. libcaldav supports some subsets of CalDAV.