CalDAV server discovery for principal and calendar-home-set URLs.
Implements the two-step discovery flow described in RFC 5397 and RFC 4791:
PROPFINDthe base URL forDAV:current-user-principal.PROPFINDthe principal URL forCALDAV:calendar-home-set.
Relative href values returned by the server are resolved against the
client's configured base_url.
Summary
Functions
Discovers the principal and calendar-home-set URLs for the authenticated user.
Functions
@spec discover(CalDAVEx.Client.t()) :: {:ok, CalDAVEx.Types.DiscoveryInfo.t()} | {:error, CalDAVEx.Error.t()}
Discovers the principal and calendar-home-set URLs for the authenticated user.
Parameters
client- an authenticated%CalDAVEx.Client{}
Returns
{:ok, %CalDAVEx.Types.DiscoveryInfo{}}on success{:error, %CalDAVEx.Error{}}on transport, HTTP, XML, or protocol failures
Examples
{:ok, info} = CalDAVEx.Discovery.discover(client)
info.principal_url
info.calendar_home_set_url