From e16f567c19f9d6920e6fe3576abea8d36c6c169f Mon Sep 17 00:00:00 2001 From: glyph Date: Mon, 8 Aug 2022 08:25:31 +0100 Subject: [PATCH] revert friends example code --- examples/friends.rs | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/examples/friends.rs b/examples/friends.rs index 1e424f3..c0fcf06 100644 --- a/examples/friends.rs +++ b/examples/friends.rs @@ -1,6 +1,10 @@ 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 // 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 // secret file at the Patchwork path and the default IP address, port // and network key (aka. capabilities key). - let mut sbot_client = - 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); - /* + let mut sbot_client = Sbot::init(Keystore::Patchwork, None, None).await?; // Call the `whoami` RPC method to retrieve the public key for the sbot // identity. This is our 'local' public key. @@ -120,8 +114,6 @@ async fn run() -> Result<(), GolgiError> { // Output should be `false`. println!("isfollowingmref(should be false): {}", mref); - */ - Ok(()) }