Added follow peer method

This commit is contained in:
Mahesh Bansod 2021-10-23 18:48:32 +05:30
parent 48534a8d64
commit bc4e8c2216
1 changed files with 17 additions and 0 deletions

View File

@ -75,6 +75,23 @@ pub async fn unfollow_peer(
.await
}
/// FollowPeer
pub async fn follow_peer(
client: &rawclient::Client,
session_identification: SessionIdentification,
peer: String,
) -> Result<RelationshipType, Error> {
client
.send_request(
"network.follow_peer",
json!({
"session_identification": serde_json::to_value(session_identification)?,
"peer": peer,
}),
)
.await
}
#[cfg(test)]
mod tests {
use super::*;