# PeerTubee - Eio-based PeerTube API Client This is a port of the PeerTube library from Lwt/Cohttp to Eio/Requests. ## Changes from Original - **Removed** `open Lwt.Infix` - **Replaced** all `Lwt.t` return types with direct return types (direct-style) - **Added** `~sw:Eio.Switch.t` and `~env:<...>` parameters to all public functions - **Replaced** `Cohttp_lwt_unix.Client.get` with `Requests.One.get` - **Replaced** `Cohttp_lwt.Body.to_string body >>= fun s ->` with `let s = Requests.Response.body response |> Eio.Flow.read_all in` - **Replaced** `>>=` (Lwt.bind) with direct let bindings - **Replaced** `Lwt.return` with direct values - **Replaced** `Lwt.return_ok`/`Lwt.return_error` with `Ok`/`Error` - **Replaced** `open_out_bin` with `Eio.Path.save` for file writing - **Used** `Requests.One.create` with `Eio.Stdenv.clock` and `Eio.Stdenv.net` ## Statistics - Original: 191 lines - Ported: 188 lines - Functions: 8 public functions - All JSON parsing logic preserved - All type definitions preserved ## Files Created - `/workspace/stack/bushel/peertubee/peertubee.ml` - Implementation (188 lines) - `/workspace/stack/bushel/peertubee/peertubee.mli` - Interface (69 lines) - `/workspace/stack/bushel/peertubee/dune` - Build configuration - `/workspace/stack/bushel/peertubee.opam` - Package metadata ## Dependencies - ezjsonm - JSON parsing - eio + eio.core - Effects-based concurrency - requests - HTTP client - ptime - Time handling - fmt - Formatted output