Skip to main content

Module api

Module api 

Source
Expand description

Typed HTTP client for the FicHub REST API.

Wraps reqwest and every endpoint the bot uses. Never touches the FicHub database directly — this is the shared contract between the bot and the archive (mirrors what the frontend’s api/client.ts does).

Auth: endpoints that need a logged-in user (/api/recommendations/personal, /api/v1/feed, /api/bookmarks, /api/ratings, /api/kudos, /api/blocks, /api/requests voting, /api/roadmap voting) take an auth_token and send it as Authorization: Bearer <token>.

Structs§

FichubClient
A client for the FicHub REST API.
SearchParams
Query parameter builder for advanced search.