Rename sbot module and improve documentation #27
Loading…
Reference in New Issue
No description provided.
Delete Branch "docs_review"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR renames the
src/sbot
module tosrc/api
and moves thewhoami
method into a separate module (src/api/whoami.rs
). This means thatsrc/sbot.rs
contains theSbot
struct
and connection methods, while all other implemented methods are located in thesrc/api
module.While working on this PR, I rendered the documentation (
cargo doc --open --no-deps
) and used that as my primary means of evaluating the clarity of crate organisation and documentation. My goal was to make it as easy as possible for a potentialgolgi
user to navigate and use the library by only looking at the generated Rust docs.Each API module contains a list of implemented methods with a link to the detailed docs for each one (see the screenshot below for an example). I think this provides a neat way to get an overview of the available features without having to go straight to the
Sbot
docs page and search through all the methods.API-specific types from
kuska
are exported through the relevant API modules. For example, the subset types:The main
Sbot
type and error type are exported at the top-level:hey @glyph, I'm back online now, but still not with great work conditions.
cool to see this coming together :=)
Lots of additional commits in the past two days.
I've added a working example for every method in the API. Really pleased with this approach!
I have found the The rustdoc book to be a handy resource (I'd somehow never read it before).
I've also added relatively extensive comments to each one of the examples (and I've renamed them to remove the
ssb-
portion in each filename).