My agentic slop goes here. Not intended for anyone else!
1# PeerTubee - Eio-based PeerTube API Client
2
3This is a port of the PeerTube library from Lwt/Cohttp to Eio/Requests.
4
5## Changes from Original
6
7- **Removed** `open Lwt.Infix`
8- **Replaced** all `Lwt.t` return types with direct return types (direct-style)
9- **Added** `~sw:Eio.Switch.t` and `~env:<...>` parameters to all public functions
10- **Replaced** `Cohttp_lwt_unix.Client.get` with `Requests.One.get`
11- **Replaced** `Cohttp_lwt.Body.to_string body >>= fun s ->` with `let s = Requests.Response.body response |> Eio.Flow.read_all in`
12- **Replaced** `>>=` (Lwt.bind) with direct let bindings
13- **Replaced** `Lwt.return` with direct values
14- **Replaced** `Lwt.return_ok`/`Lwt.return_error` with `Ok`/`Error`
15- **Replaced** `open_out_bin` with `Eio.Path.save` for file writing
16- **Used** `Requests.One.create` with `Eio.Stdenv.clock` and `Eio.Stdenv.net`
17
18## Statistics
19
20- Original: 191 lines
21- Ported: 188 lines
22- Functions: 8 public functions
23- All JSON parsing logic preserved
24- All type definitions preserved
25
26## Files Created
27
28- `/workspace/stack/bushel/peertubee/peertubee.ml` - Implementation (188 lines)
29- `/workspace/stack/bushel/peertubee/peertubee.mli` - Interface (69 lines)
30- `/workspace/stack/bushel/peertubee/dune` - Build configuration
31- `/workspace/stack/bushel/peertubee.opam` - Package metadata
32
33## Dependencies
34
35- ezjsonm - JSON parsing
36- eio + eio.core - Effects-based concurrency
37- requests - HTTP client
38- ptime - Time handling
39- fmt - Formatted output