update code example
This commit is contained in:
parent
42a43189fc
commit
c2cff416d0
17
README.md
17
README.md
|
@ -5,12 +5,21 @@ Rust wrapper around the Go `sbotcli` ScuttleButt tool ([cryptoscope/ssb](https:/
|
|||
## Example
|
||||
|
||||
```rust
|
||||
let id = "@p13zSAiOpguI9nsawkGijsnMfWmFd5rlUNpzekEE+vI=.ed25519";
|
||||
use peach_sbotcli::{Sbot, SbotCliError};
|
||||
|
||||
let follow_ref = peach_sbotcli::follow(id)?;
|
||||
let block_ref = peach_sbotcli::block(id)?;
|
||||
fn example() -> Result<(), SbotCliError> {
|
||||
// uses default paths for `sbotcli` and `go-sbot` working directory
|
||||
let sbot = Sbot::init(None, None)?;
|
||||
|
||||
let invite_code = peach_sbotcli::create_invite()?;
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue