go-sbotcli-rs/README.md

38 lines
848 B
Markdown
Raw Permalink Normal View History

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