My agentic slop goes here. Not intended for anyone else!
at main 2.1 kB view raw
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(** River user composed from Sortal contact data + sync state. 19 20 User data is stored in Sortal and read on-demand. River only persists 21 sync timestamps and optional per-user overrides. *) 22 23type t 24(** A River user composed from Sortal.Contact + sync metadata. *) 25 26val of_contact : Sortal.Contact.t -> ?last_synced:string -> unit -> t 27(** [of_contact contact ()] creates a River user from a Sortal contact. 28 29 @param contact The Sortal contact to base this user on 30 @param last_synced Optional ISO 8601 timestamp of last sync *) 31 32val username : t -> string 33(** [username user] returns the username (from Sortal.Contact.handle). *) 34 35val fullname : t -> string 36(** [fullname user] returns the full name (from Sortal.Contact.primary_name). *) 37 38val email : t -> string option 39(** [email user] returns the email address (from Sortal.Contact). *) 40 41val feeds : t -> Source.t list 42(** [feeds user] returns the list of subscribed feeds (from Sortal.Contact). *) 43 44val last_synced : t -> string option 45(** [last_synced user] returns the last sync timestamp if set. *) 46 47val contact : t -> Sortal.Contact.t 48(** [contact user] returns the underlying Sortal contact. *) 49 50val set_last_synced : t -> string -> t 51(** [set_last_synced user timestamp] returns a new user with updated sync time. *)