Trait reactions_rpc::ReactionsApi[][src]

pub trait ReactionsApi<BlockHash, AccountId, BlockNumber>: Sized + Send + Sync + 'static {
    fn get_reactions_by_ids(
        &self,
        at: Option<BlockHash>,
        reaction_ids: Vec<ReactionId>
    ) -> Result<Vec<FlatReaction<AccountId, BlockNumber>>>;
fn get_reactions_by_post_id(
        &self,
        at: Option<BlockHash>,
        post_id: PostId,
        limit: u64,
        offset: u64
    ) -> Result<Vec<FlatReaction<AccountId, BlockNumber>>>;
fn get_reaction_kinds_by_post_ids_and_reactor(
        &self,
        at: Option<BlockHash>,
        post_ids: Vec<PostId>,
        reactor: AccountId
    ) -> Result<BTreeMap<PostId, ReactionKind>>; fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
    where
        BlockHash: Send + Sync + 'static + DeserializeOwned,
        AccountId: Send + Sync + 'static + Serialize + DeserializeOwned,
        BlockNumber: Send + Sync + 'static + Serialize
, { ... } }

Required methods

fn get_reactions_by_ids(
    &self,
    at: Option<BlockHash>,
    reaction_ids: Vec<ReactionId>
) -> Result<Vec<FlatReaction<AccountId, BlockNumber>>>
[src]

fn get_reactions_by_post_id(
    &self,
    at: Option<BlockHash>,
    post_id: PostId,
    limit: u64,
    offset: u64
) -> Result<Vec<FlatReaction<AccountId, BlockNumber>>>
[src]

fn get_reaction_kinds_by_post_ids_and_reactor(
    &self,
    at: Option<BlockHash>,
    post_ids: Vec<PostId>,
    reactor: AccountId
) -> Result<BTreeMap<PostId, ReactionKind>>
[src]

Loading content...

Provided methods

fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M> where
    BlockHash: Send + Sync + 'static + DeserializeOwned,
    AccountId: Send + Sync + 'static + Serialize + DeserializeOwned,
    BlockNumber: Send + Sync + 'static + Serialize
[src]

Create an IoDelegate, wiring rpc calls to the trait methods.

Loading content...

Implementors

impl<C, Block, AccountId, BlockNumber> ReactionsApi<<Block as Block>::Hash, AccountId, BlockNumber> for Reactions<C, Block> where
    Block: BlockT,
    AccountId: Codec,
    BlockNumber: Codec,
    C: Send + Sync + 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>,
    C::Api: ReactionsRuntimeApi<Block, AccountId, BlockNumber>, 
[src]

Loading content...