minor improvements in readme examples
This commit is contained in:
parent
5d82c85944
commit
4b20caa7cf
12
README.md
12
README.md
|
@ -20,8 +20,7 @@ Development efforts are currently oriented towards
|
|||
Golgi offers the ability to invoke individual RPC methods while also
|
||||
providing a number of convenience methods which may involve multiple RPC
|
||||
calls and / or the processing of data received from those calls. The
|
||||
[`Sbot`](crate::sbot::Sbot) `struct` is the primary means of interacting
|
||||
with the library.
|
||||
`Sbot` `struct` is the primary means of interacting with the library.
|
||||
|
||||
Features include the ability to publish messages of various kinds; to
|
||||
retrieve messages (e.g. `about` and `description` messages) and formulate
|
||||
|
@ -34,13 +33,12 @@ Basic usage is demonstrated below. Visit the [examples directory](https://git.co
|
|||
more comprehensive examples.
|
||||
|
||||
```rust
|
||||
use golgi::GolgiError;
|
||||
use golgi::sbot::Sbot;
|
||||
use golgi::{GolgiError, Sbot};
|
||||
|
||||
pub async fn run() -> Result<(), GolgiError> {
|
||||
// Attempt to connect to an sbot instance using the default IP address,
|
||||
// port and network key (aka. capabilities key).
|
||||
let mut sbot_client = Sbot::connect(None, None).await?;
|
||||
// Attempt to initialise a connection to an sbot instance using the default
|
||||
// IP address, port and network key (aka. capabilities key).
|
||||
let mut sbot_client = Sbot::init(None, None).await?;
|
||||
|
||||
// Call the `whoami` RPC method to retrieve the public key for the sbot
|
||||
// identity.
|
||||
|
|
Loading…
Reference in New Issue