add friends.blocks rpc request
This commit is contained in:
parent
89ab03973f
commit
87e3ea58ba
|
@ -19,6 +19,7 @@ pub enum ApiMethod {
|
||||||
FriendsIsFollowing,
|
FriendsIsFollowing,
|
||||||
FriendsIsBlocking,
|
FriendsIsBlocking,
|
||||||
FriendsHops,
|
FriendsHops,
|
||||||
|
FriendsBlocks,
|
||||||
GetSubset,
|
GetSubset,
|
||||||
Publish,
|
Publish,
|
||||||
WhoAmI,
|
WhoAmI,
|
||||||
|
@ -39,6 +40,7 @@ impl ApiMethod {
|
||||||
FriendsIsFollowing => &["friends", "isFollowing"],
|
FriendsIsFollowing => &["friends", "isFollowing"],
|
||||||
FriendsIsBlocking => &["friends", "isBlocking"],
|
FriendsIsBlocking => &["friends", "isBlocking"],
|
||||||
FriendsHops => &["friends", "hops"],
|
FriendsHops => &["friends", "hops"],
|
||||||
|
FriendsBlocks => &["friends", "blocks"],
|
||||||
GetSubset => &["partialReplication", "getSubset"],
|
GetSubset => &["partialReplication", "getSubset"],
|
||||||
Publish => &["publish"],
|
Publish => &["publish"],
|
||||||
WhoAmI => &["whoami"],
|
WhoAmI => &["whoami"],
|
||||||
|
@ -58,6 +60,7 @@ impl ApiMethod {
|
||||||
["friends", "isFollowing"] => Some(FriendsIsFollowing),
|
["friends", "isFollowing"] => Some(FriendsIsFollowing),
|
||||||
["friends", "isBlocking"] => Some(FriendsIsBlocking),
|
["friends", "isBlocking"] => Some(FriendsIsBlocking),
|
||||||
["friends", "hops"] => Some(FriendsHops),
|
["friends", "hops"] => Some(FriendsHops),
|
||||||
|
["friends", "blocks"] => Some(FriendsBlocks),
|
||||||
["partialReplication", "getSubset"] => Some(GetSubset),
|
["partialReplication", "getSubset"] => Some(GetSubset),
|
||||||
["publish"] => Some(Publish),
|
["publish"] => Some(Publish),
|
||||||
["whoami"] => Some(WhoAmI),
|
["whoami"] => Some(WhoAmI),
|
||||||
|
@ -172,6 +175,22 @@ impl<W: Write + Unpin> ApiCaller<W> {
|
||||||
Ok(req_no)
|
Ok(req_no)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Send ["friends", "blocks"] request
|
||||||
|
pub async fn friends_blocks_req_send(&mut self) -> Result<RequestNo> {
|
||||||
|
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.
|
/// Send ["partialReplication", "getSubset"] request.
|
||||||
pub async fn getsubset_req_send(
|
pub async fn getsubset_req_send(
|
||||||
&mut self,
|
&mut self,
|
||||||
|
|
Loading…
Reference in New Issue