package yocaml_syndication

  1. Overview
  2. Docs

Module Yocaml_syndication.Rss2Source

Implementation of the RSS2 specification, documented here: specs.

Types

Types that briefly describe the RSS 2 specification. As the channel is closely linked to the description of a feed, the module does not export a channel type, as it is constructed when the feed is built.

Sourcetype days =
  1. | Mon
  2. | Tue
  3. | Wed
  4. | Thu
  5. | Fri
  6. | Sat
  7. | Sun

Type describing days (for skip days).

Sourcetype cloud_protocol =
  1. | Xml_rpc
  2. | Soap
  3. | Http_post
Sourcetype enclosure
Sourcetype guid_strategy

Type describing the guid inference attribute.

Sourcetype source

Construction of elements

Sourceval cloud : protocol:cloud_protocol -> domain:string -> port:int -> path:string -> register_procedure:string -> cloud
Sourceval enclosure : url:string -> media_type:Media_type.t -> length:int -> enclosure
Sourceval guid_from_title : guid_strategy

Infer GUID from the item title.

Infer GUID from the item url.

Sourceval guid : is_permalink:bool -> string -> guid_strategy
Sourceval source : title:string -> url:string -> source
Sourceval image : title:string -> link:string -> ?description:string -> ?width:int -> ?height:int -> url:string -> unit -> image
Sourceval item : ?author:Person.t -> ?categories:Category.t list -> ?comments:string -> ?enclosure:enclosure -> ?guid:guid_strategy -> ?pub_date:Datetime.t -> ?source:source -> title:string -> link:string -> description:string -> unit -> item

Building a feed

Sourceval feed : ?encoding:string -> ?standalone:bool -> ?language:Lang.t -> ?copyright:string -> ?managing_editor:Person.t -> ?webmaster:Person.t -> ?pub_date:Datetime.t -> ?last_build_date:Datetime.t -> ?categories:Category.t list -> ?generator:Generator.t -> ?cloud:cloud -> ?ttl:int -> ?image:(title:string -> link:string -> image) -> ?text_input:Text_input.t -> ?skip_hours:int list -> ?skip_days:days list -> title:string -> link:string -> url:string -> description:string -> ('a -> item) -> 'a list -> Xml.t

Arrows for building a feed

Sourceval from : ?encoding:string -> ?standalone:bool -> ?language:Lang.t -> ?copyright:string -> ?managing_editor:Person.t -> ?webmaster:Person.t -> ?pub_date:Datetime.t -> ?last_build_date:Datetime.t -> ?categories:Category.t list -> ?generator:Generator.t -> ?cloud:cloud -> ?ttl:int -> ?image:(title:string -> link:string -> image) -> ?text_input:Text_input.t -> ?skip_hours:int list -> ?skip_days:days list -> title:string -> site_url:string -> feed_url:string -> description:string -> ('a -> item) -> ('a list, string) Yocaml.Task.t

An arrow that build a feed that from an arbitrary list.

Sourceval from_articles : ?encoding:string -> ?standalone:bool -> ?language:Lang.t -> ?copyright:string -> ?managing_editor:Person.t -> ?webmaster:Person.t -> ?pub_date:Datetime.t -> ?categories:Category.t list -> ?generator:Generator.t -> ?cloud:cloud -> ?ttl:int -> ?image:(title:string -> link:string -> image) -> ?text_input:Text_input.t -> ?skip_hours:int list -> ?skip_days:days list -> title:string -> site_url:string -> feed_url:string -> description:string -> unit -> ((Yocaml.Path.t * Yocaml.Archetype.Article.t) list, string) Yocaml.Task.t

An arrow that build a feed that fit with Yocaml.Archetype.Articles.fetch. link is concatenate with the given path to compute the link of an item.

OCaml

Innovation. Community. Security.