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 Sbotstruct 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:
The main Sbot type and error type are exported at the top-level:
usegolgi::{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};
```
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 main2022-02-15 08:34:51 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR renames the
src/sbotmodule tosrc/apiand moves thewhoamimethod into a separate module (src/api/whoami.rs). This means thatsrc/sbot.rscontains theSbotstructand connection methods, while all other implemented methods are located in thesrc/apimodule.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 potentialgolgiuser 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
Sbotdocs page and search through all the methods.API-specific types from
kuskaare exported through the relevant API modules. For example, the subset types:The main
Sbottype 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).