package erssical

  1. Overview
  2. Docs

Operations on channels and queries.

val get_source_channels : Log.t -> Types.query -> Types.channel list Lwt.t

Return the list of channels from the queries, fetching channels from URLs if needed.

  • raises Failure

    in case of error.

  • returns

    a list of pairs (channel, errors), where errors is the list of non-fatal errors encountered while parsing the channel XML.

val get_target_channel : Log.t -> Types.query -> Types.channel option Lwt.t

Same as get_source_channels but return the optional target of the query.

module UMap : Stdlib.Map.S with type key = Uri.t
val merge_channels : ?target:('a, 'b) Rss.channel_t -> ('a, 'b) Rss.channel_t list -> ('a, 'b) Rss.channel_t

merge_channels ?target sources merges the given source channels, including the optional target channel.

If two items have the same item_link, then only the first one is kept. The item_source field of each item is set to the original channel URL, if the source channel was given with an URL in the query. Return a new channel, using information from the "base" channel. This "base" channel is the given target, or else the first channel of the list.

  • raises Failure

    in case of error (e.g. when no channel is given).

Execute a query.

  • parameter rtype

    can be used to override the return type specified in the query.

  • raises Failure

    in case of error.

OCaml

Innovation. Community. Security.