diff --git a/src/api/helper.rs b/src/api/helper.rs index 73b8f24..090f864 100644 --- a/src/api/helper.rs +++ b/src/api/helper.rs @@ -19,6 +19,7 @@ pub enum ApiMethod { FriendsIsFollowing, FriendsIsBlocking, FriendsHops, + FriendsBlocks, GetSubset, Publish, WhoAmI, @@ -39,6 +40,7 @@ impl ApiMethod { FriendsIsFollowing => &["friends", "isFollowing"], FriendsIsBlocking => &["friends", "isBlocking"], FriendsHops => &["friends", "hops"], + FriendsBlocks => &["friends", "blocks"], GetSubset => &["partialReplication", "getSubset"], Publish => &["publish"], WhoAmI => &["whoami"], @@ -58,6 +60,7 @@ impl ApiMethod { ["friends", "isFollowing"] => Some(FriendsIsFollowing), ["friends", "isBlocking"] => Some(FriendsIsBlocking), ["friends", "hops"] => Some(FriendsHops), + ["friends", "blocks"] => Some(FriendsBlocks), ["partialReplication", "getSubset"] => Some(GetSubset), ["publish"] => Some(Publish), ["whoami"] => Some(WhoAmI), @@ -172,6 +175,22 @@ impl ApiCaller { Ok(req_no) } + /// Send ["friends", "blocks"] request + pub async fn friends_blocks_req_send(&mut self) -> Result { + let args: [&str; 0] = []; + let req_no = self + .rpc + .send_request( + ApiMethod::FriendsBlocks.selector(), + RpcType::Source, + ArgType::Object, + &args, + &None::<()>, + ) + .await?; + Ok(req_no) + } + /// Send ["partialReplication", "getSubset"] request. pub async fn getsubset_req_send( &mut self,