Kantoor. Feeds. Url
(Kantoor v1.0.0)
The address of a calendar feed, as a person pastes it.
Only https is accepted. webcal:// (and webcals://), the scheme calendar
software uses to mean "subscribe to this", is rewritten to https://. An address
with a user name or password, a port other than 443, no host or more than 2048
characters is refused. The check is on the text;
where the host name leads is decided at fetch time (Kantoor.Feeds.NetGuard).
Summary
Functions
The host of a normalised address: all that is ever shown.
A person-readable reason for a normalisation error (English; the UI translates).
Normalises input to an https address, or says why not.
Types
Functions
The host of a normalised address: all that is ever shown.
A person-readable reason for a normalisation error (English; the UI translates).
Normalises input to an https address, or says why not.
iex> Kantoor.Feeds.Url.normalize("webcal://cal.example.com/a.ics")
{:ok, "https://cal.example.com/a.ics"}