Rename sbot module and improve documentation #27

Merged
glyph merged 27 commits from docs_review into main 2022-02-15 08:34:51 +00:00
Owner

This PR renames the src/sbot module to src/api and moves the whoami method into a separate module (src/api/whoami.rs). This means that src/sbot.rs contains the Sbot struct and connection methods, while all other implemented methods are located in the src/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 potential golgi 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:

use golgi::api::get_subset::{SubsetQuery, SubsetQueryOptions};

The main Sbot type and error type are exported at the top-level:

use golgi::{Sbot, GolgiError};
This PR renames the `src/sbot` module to `src/api` and moves the `whoami` method into a separate module (`src/api/whoami.rs`). This means that `src/sbot.rs` contains the `Sbot` `struct` and connection methods, while all other implemented methods are located in the `src/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 potential `golgi` 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: ```rust use golgi::api::get_subset::{SubsetQuery, SubsetQueryOptions}; ``` The main `Sbot` type and error type are exported at the top-level: ```rust use golgi::{Sbot, GolgiError}; ```
glyph added 9 commits 2022-02-08 10:05:20 +00:00
glyph added 3 commits 2022-02-08 13:05:06 +00:00
Owner

hey @glyph, I'm back online now, but still not with great work conditions.

cool to see this coming together :=)

hey @glyph, I'm back online now, but still not with great work conditions. cool to see this coming together :=)
glyph added 1 commit 2022-02-09 06:55:27 +00:00
glyph added 2 commits 2022-02-14 10:23:48 +00:00
glyph added 1 commit 2022-02-14 12:31:42 +00:00
glyph added 2 commits 2022-02-14 13:52:49 +00:00
glyph added 2 commits 2022-02-14 14:13:38 +00:00
glyph added 4 commits 2022-02-14 15:00:21 +00:00
glyph added 3 commits 2022-02-15 08:27:54 +00:00
Author
Owner

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).

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](https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html) 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).
glyph merged commit 5099b56ecb into main 2022-02-15 08:34:51 +00:00
glyph deleted branch docs_review 2022-02-15 08:34:52 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: golgi-ssb/golgi#27
No description provided.