My agentic slop goes here. Not intended for anyone else!
1(*
2 * Copyright (c) 2014, OCaml.org project
3 * Copyright (c) 2015 KC Sivaramakrishnan <sk826@cl.cam.ac.uk>
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 *)
17
18(** Feed fetching and parsing. *)
19
20type feed_content = River_jsonfeed.t
21(** The underlying feed content, stored in JSONFeed format with extensions.
22
23 All feed formats (Atom, RSS2, JSONFeed) are converted to JSONFeed upon
24 fetching. Atom-specific metadata is preserved using extensions. *)
25
26type t
27(** A feed, stored natively in JSONFeed format. *)
28
29val fetch : Session.t -> Source.t -> t
30(** [fetch session source] fetches and parses a feed from the given source.
31
32 @param session The HTTP session
33 @param source The feed source to fetch
34 @raise Failure if the feed cannot be fetched or parsed *)
35
36val source : t -> Source.t
37(** [source feed] returns the source this feed was fetched from. *)
38
39val content : t -> feed_content
40(** [content feed] returns the underlying feed content. *)
41
42val title : t -> string
43(** [title feed] returns the feed title. *)