|
|
|
@ -27,10 +27,10 @@ impl Sbot {
|
|
|
|
|
/// # Example
|
|
|
|
|
///
|
|
|
|
|
/// ```rust
|
|
|
|
|
/// use golgi::{Sbot, GolgiError};
|
|
|
|
|
/// use golgi::{Sbot, GolgiError, sbot::Keystore};
|
|
|
|
|
///
|
|
|
|
|
/// async fn follow_peer() -> Result<(), GolgiError> {
|
|
|
|
|
/// let mut sbot_client = Sbot::init(None, None).await?;
|
|
|
|
|
/// let mut sbot_client = Sbot::init(Keystore::Patchwork, None, None).await?;
|
|
|
|
|
///
|
|
|
|
|
/// let ssb_id = "@zqshk7o2Rpd/OaZ/MxH6xXONgonP1jH+edK9+GZb/NY=.ed25519";
|
|
|
|
|
///
|
|
|
|
@ -56,10 +56,10 @@ impl Sbot {
|
|
|
|
|
/// # Example
|
|
|
|
|
///
|
|
|
|
|
/// ```rust
|
|
|
|
|
/// use golgi::{Sbot, GolgiError};
|
|
|
|
|
/// use golgi::{Sbot, GolgiError, sbot::Keystore};
|
|
|
|
|
///
|
|
|
|
|
/// async fn unfollow_peer() -> Result<(), GolgiError> {
|
|
|
|
|
/// let mut sbot_client = Sbot::init(None, None).await?;
|
|
|
|
|
/// let mut sbot_client = Sbot::init(Keystore::Patchwork, None, None).await?;
|
|
|
|
|
///
|
|
|
|
|
/// let ssb_id = "@zqshk7o2Rpd/OaZ/MxH6xXONgonP1jH+edK9+GZb/NY=.ed25519";
|
|
|
|
|
///
|
|
|
|
@ -85,10 +85,10 @@ impl Sbot {
|
|
|
|
|
/// # Example
|
|
|
|
|
///
|
|
|
|
|
/// ```rust
|
|
|
|
|
/// use golgi::{Sbot, GolgiError};
|
|
|
|
|
/// use golgi::{Sbot, GolgiError, sbot::Keystore};
|
|
|
|
|
///
|
|
|
|
|
/// async fn block_peer() -> Result<(), GolgiError> {
|
|
|
|
|
/// let mut sbot_client = Sbot::init(None, None).await?;
|
|
|
|
|
/// let mut sbot_client = Sbot::init(Keystore::Patchwork, None, None).await?;
|
|
|
|
|
///
|
|
|
|
|
/// let ssb_id = "@zqshk7o2Rpd/OaZ/MxH6xXONgonP1jH+edK9+GZb/NY=.ed25519";
|
|
|
|
|
///
|
|
|
|
@ -116,10 +116,10 @@ impl Sbot {
|
|
|
|
|
/// # Example
|
|
|
|
|
///
|
|
|
|
|
/// ```rust
|
|
|
|
|
/// use golgi::{Sbot, GolgiError};
|
|
|
|
|
/// use golgi::{Sbot, GolgiError, sbot::Keystore};
|
|
|
|
|
///
|
|
|
|
|
/// async fn unblock_peer() -> Result<(), GolgiError> {
|
|
|
|
|
/// let mut sbot_client = Sbot::init(None, None).await?;
|
|
|
|
|
/// let mut sbot_client = Sbot::init(Keystore::Patchwork, None, None).await?;
|
|
|
|
|
///
|
|
|
|
|
/// let ssb_id = "@zqshk7o2Rpd/OaZ/MxH6xXONgonP1jH+edK9+GZb/NY=.ed25519";
|
|
|
|
|
///
|
|
|
|
@ -142,10 +142,10 @@ impl Sbot {
|
|
|
|
|
/// # Example
|
|
|
|
|
///
|
|
|
|
|
/// ```rust
|
|
|
|
|
/// use golgi::{Sbot, GolgiError};
|
|
|
|
|
/// use golgi::{Sbot, GolgiError, sbot::Keystore};
|
|
|
|
|
///
|
|
|
|
|
/// async fn relationship() -> Result<(), GolgiError> {
|
|
|
|
|
/// let mut sbot_client = Sbot::init(None, None).await?;
|
|
|
|
|
/// let mut sbot_client = Sbot::init(Keystore::Patchwork, None, None).await?;
|
|
|
|
|
///
|
|
|
|
|
/// let ssb_id = "@zqshk7o2Rpd/OaZ/MxH6xXONgonP1jH+edK9+GZb/NY=.ed25519";
|
|
|
|
|
/// let following = Some(true);
|
|
|
|
@ -184,10 +184,10 @@ impl Sbot {
|
|
|
|
|
/// # Example
|
|
|
|
|
///
|
|
|
|
|
/// ```rust
|
|
|
|
|
/// use golgi::{Sbot, GolgiError, api::friends::RelationshipQuery};
|
|
|
|
|
/// use golgi::{Sbot, GolgiError, api::friends::RelationshipQuery, sbot::Keystore};
|
|
|
|
|
///
|
|
|
|
|
/// async fn relationship() -> Result<(), GolgiError> {
|
|
|
|
|
/// let mut sbot_client = Sbot::init(None, None).await?;
|
|
|
|
|
/// let mut sbot_client = Sbot::init(Keystore::Patchwork, None, None).await?;
|
|
|
|
|
///
|
|
|
|
|
/// let peer_a = "@zqshk7o2Rpd/OaZ/MxH6xXONgonP1jH+edK9+GZb/NY=.ed25519";
|
|
|
|
|
/// let peer_b = "@3QoWCcy46X9a4jTnOl8m3+n1gKfbsukWuODDxNGN0W8=.ed25519";
|
|
|
|
@ -234,10 +234,10 @@ impl Sbot {
|
|
|
|
|
/// # Example
|
|
|
|
|
///
|
|
|
|
|
/// ```rust
|
|
|
|
|
/// use golgi::{Sbot, GolgiError, api::friends::RelationshipQuery};
|
|
|
|
|
/// use golgi::{Sbot, GolgiError, api::friends::RelationshipQuery, sbot::Keystore};
|
|
|
|
|
///
|
|
|
|
|
/// async fn relationship() -> Result<(), GolgiError> {
|
|
|
|
|
/// let mut sbot_client = Sbot::init(None, None).await?;
|
|
|
|
|
/// let mut sbot_client = Sbot::init(Keystore::Patchwork, None, None).await?;
|
|
|
|
|
///
|
|
|
|
|
/// let peer_a = "@zqshk7o2Rpd/OaZ/MxH6xXONgonP1jH+edK9+GZb/NY=.ed25519";
|
|
|
|
|
/// let peer_b = "@3QoWCcy46X9a4jTnOl8m3+n1gKfbsukWuODDxNGN0W8=.ed25519";
|
|
|
|
@ -282,10 +282,10 @@ impl Sbot {
|
|
|
|
|
/// # Example
|
|
|
|
|
///
|
|
|
|
|
/// ```rust
|
|
|
|
|
/// use golgi::{Sbot, GolgiError};
|
|
|
|
|
/// use golgi::{Sbot, GolgiError, sbot::Keystore};
|
|
|
|
|
///
|
|
|
|
|
/// async fn follows() -> Result<(), GolgiError> {
|
|
|
|
|
/// let mut sbot_client = Sbot::init(None, None).await?;
|
|
|
|
|
/// let mut sbot_client = Sbot::init(Keystore::Patchwork, None, None).await?;
|
|
|
|
|
///
|
|
|
|
|
/// let follows = sbot_client.get_blocks().await?;
|
|
|
|
|
///
|
|
|
|
@ -314,10 +314,10 @@ impl Sbot {
|
|
|
|
|
/// # Example
|
|
|
|
|
///
|
|
|
|
|
/// ```rust
|
|
|
|
|
/// use golgi::{Sbot, GolgiError};
|
|
|
|
|
/// use golgi::{Sbot, GolgiError, sbot::Keystore};
|
|
|
|
|
///
|
|
|
|
|
/// async fn follows() -> Result<(), GolgiError> {
|
|
|
|
|
/// let mut sbot_client = Sbot::init(None, None).await?;
|
|
|
|
|
/// let mut sbot_client = Sbot::init(Keystore::Patchwork, None, None).await?;
|
|
|
|
|
///
|
|
|
|
|
/// let follows = sbot_client.get_follows().await?;
|
|
|
|
|
///
|
|
|
|
@ -350,10 +350,10 @@ impl Sbot {
|
|
|
|
|
/// # Example
|
|
|
|
|
///
|
|
|
|
|
/// ```rust
|
|
|
|
|
/// use golgi::{Sbot, GolgiError};
|
|
|
|
|
/// use golgi::{Sbot, GolgiError, sbot::Keystore};
|
|
|
|
|
///
|
|
|
|
|
/// async fn followers() -> Result<(), GolgiError> {
|
|
|
|
|
/// let mut sbot_client = Sbot::init(None, None).await?;
|
|
|
|
|
/// let mut sbot_client = Sbot::init(Keystore::Patchwork, None, None).await?;
|
|
|
|
|
///
|
|
|
|
|
/// // let followers = sbot_client.get_followers().await?;
|
|
|
|
|
///
|
|
|
|
@ -395,10 +395,10 @@ impl Sbot {
|
|
|
|
|
/// # Example
|
|
|
|
|
///
|
|
|
|
|
/// ```rust
|
|
|
|
|
/// use golgi::{Sbot, GolgiError, api::friends::FriendsHops};
|
|
|
|
|
/// use golgi::{Sbot, GolgiError, api::friends::FriendsHops, sbot::Keystore};
|
|
|
|
|
///
|
|
|
|
|
/// async fn peers_within_range() -> Result<(), GolgiError> {
|
|
|
|
|
/// let mut sbot_client = Sbot::init(None, None).await?;
|
|
|
|
|
/// let mut sbot_client = Sbot::init(Keystore::Patchwork, None, None).await?;
|
|
|
|
|
///
|
|
|
|
|
/// let hops = 2;
|
|
|
|
|
///
|
|
|
|
|