38 lines
848 B
Markdown
38 lines
848 B
Markdown
# go-sbotcli-rs
|
|
|
|
Rust wrapper around the Go `sbotcli` ScuttleButt tool ([cryptoscope/ssb](https://github.com/cryptoscope/ssb)), allowing interaction with a `gosbot` instance.
|
|
|
|
## Example
|
|
|
|
```rust
|
|
use go_sbotcli_rs::{Sbot, SbotCliError};
|
|
|
|
fn example() -> Result<(), SbotCliError> {
|
|
// uses default paths for `sbotcli` and `go-sbot` working directory
|
|
let sbot = Sbot::init(None, None)?;
|
|
|
|
let id = "@p13zSAiOpguI9nsawkGijsnMfWmFd5rlUNpzekEE+vI=.ed25519";
|
|
|
|
let follow_ref = sbot.follow(id)?;
|
|
let block_ref = sbot.block(id)?;
|
|
|
|
let invite_code = sbot.create_invite()?;
|
|
|
|
Ok(())
|
|
}
|
|
```
|
|
|
|
## Documentation
|
|
|
|
Use `cargo doc` to generate and serve the Rust documentation for this library:
|
|
|
|
```bash
|
|
git clone https://git.coopcloud.tech/PeachCloud/go-sbotcli-rs.git
|
|
cd peach-sbotcli
|
|
cargo doc --no-deps --open
|
|
```
|
|
|
|
## License
|
|
|
|
LGPL-3.0
|