revert friends example code
This commit is contained in:
parent
821198a400
commit
e16f567c19
|
@ -1,6 +1,10 @@
|
||||||
use std::process;
|
use std::process;
|
||||||
|
|
||||||
use golgi::{sbot::Keystore, GolgiError, Sbot};
|
use golgi::{
|
||||||
|
api::friends::{FriendsHops, RelationshipQuery},
|
||||||
|
sbot::Keystore,
|
||||||
|
GolgiError, Sbot,
|
||||||
|
};
|
||||||
|
|
||||||
// Golgi is an asynchronous library so we must call it from within an
|
// Golgi is an asynchronous library so we must call it from within an
|
||||||
// async function. The `GolgiError` type encapsulates all possible
|
// async function. The `GolgiError` type encapsulates all possible
|
||||||
|
@ -9,17 +13,7 @@ async fn run() -> Result<(), GolgiError> {
|
||||||
// Attempt to initialise a connection to an sbot instance using the
|
// Attempt to initialise a connection to an sbot instance using the
|
||||||
// secret file at the Patchwork path and the default IP address, port
|
// secret file at the Patchwork path and the default IP address, port
|
||||||
// and network key (aka. capabilities key).
|
// and network key (aka. capabilities key).
|
||||||
let mut sbot_client =
|
let mut sbot_client = Sbot::init(Keystore::Patchwork, None, None).await?;
|
||||||
Sbot::init(Keystore::GoSbot, Some("127.0.0.1:8021".to_string()), None).await?;
|
|
||||||
// Sbot::init(Keystore::Patchwork, None, None).await?;
|
|
||||||
|
|
||||||
//let ssb_id = String::from("@PEqxT8YRvrkf2fyjAgTl8pmdo8aR4KVsKLyh0b5JyOE=.ed25519");
|
|
||||||
let ssb_id = String::from("@HEqy940T6uB+T+d9Jaa58aNfRzLx9eRWqkZljBmnkmk=.ed25519");
|
|
||||||
|
|
||||||
let name = sbot_client.get_name(&ssb_id).await?;
|
|
||||||
|
|
||||||
println!("name: {}", name);
|
|
||||||
/*
|
|
||||||
|
|
||||||
// Call the `whoami` RPC method to retrieve the public key for the sbot
|
// Call the `whoami` RPC method to retrieve the public key for the sbot
|
||||||
// identity. This is our 'local' public key.
|
// identity. This is our 'local' public key.
|
||||||
|
@ -120,8 +114,6 @@ async fn run() -> Result<(), GolgiError> {
|
||||||
// Output should be `false`.
|
// Output should be `false`.
|
||||||
println!("isfollowingmref(should be false): {}", mref);
|
println!("isfollowingmref(should be false): {}", mref);
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue