package cow

  1. Overview
  2. Docs

The Atom Syndication format. See RFC4287 for the full specification.

  • deprecated

    Please use the Syndic package instead.

type author = {
  1. name : string;
  2. uri : string option;
  3. email : string option;
}
type date = int * int * int * int * int

year, month, date, hour, minute

val compare : date -> date -> int

An Atom URI. There are lots of rules on which combinations of links are permitted in one feed. See RFC4287 Sec 4.1.1 for the gory details.

mk_link ~rel ~typ uri builds a link. rel defaults to `self, and typ represents the optional MIME type (e.g. text/html). The uri should usually be a fully qualified URI.

type meta = {
  1. id : string;
  2. title : string;
  3. subtitle : string option;
  4. author : author option;
  5. rights : string option;
  6. updated : date;
}
type summary = string option

A single entry in the Atom feed. The base represents the base href for the contents of the feed, in case it has relative links.

type entry = {
  1. entry : meta;
  2. summary : summary;
  3. content : Xml.t;
  4. base : string option;
}
type feed = {
  1. feed : meta;
  2. entries : entry list;
}
val xml_of_feed : ?self:string -> feed -> Xml.t
OCaml

Innovation. Community. Security.