Trait posts_rpc::PostsApi[][src]

pub trait PostsApi<BlockHash, AccountId, BlockNumber>: Sized + Send + Sync + 'static {
    fn get_posts_by_ids(
        &self,
        at: Option<BlockHash>,
        post_ids: Vec<PostId>,
        offset: u64,
        limit: u16
    ) -> Result<Vec<FlatPost<AccountId, BlockNumber>>>;
fn get_public_posts(
        &self,
        at: Option<BlockHash>,
        kind_filter: Vec<FlatPostKind>,
        start_id: u64,
        limit: u16
    ) -> Result<Vec<FlatPost<AccountId, BlockNumber>>>;
fn get_public_posts_by_space_id(
        &self,
        at: Option<BlockHash>,
        space_id: SpaceId,
        offset: u64,
        limit: u16
    ) -> Result<Vec<FlatPost<AccountId, BlockNumber>>>;
fn get_unlisted_posts_by_space_id(
        &self,
        at: Option<BlockHash>,
        space_id: SpaceId,
        offset: u64,
        limit: u16
    ) -> Result<Vec<FlatPost<AccountId, BlockNumber>>>;
fn get_reply_ids_by_parent_id(
        &self,
        at: Option<BlockHash>,
        post_id: PostId
    ) -> Result<Vec<PostId>>;
fn get_reply_ids_by_parent_ids(
        &self,
        at: Option<BlockHash>,
        post_ids: Vec<PostId>
    ) -> Result<BTreeMap<PostId, Vec<PostId>>>;
fn get_replies_by_parent_id(
        &self,
        at: Option<BlockHash>,
        parent_id: PostId,
        offset: u64,
        limit: u16
    ) -> Result<Vec<FlatPost<AccountId, BlockNumber>>>;
fn get_replies_by_parent_ids(
        &self,
        at: Option<BlockHash>,
        parent_ids: Vec<PostId>,
        offset: u64,
        limit: u16
    ) -> Result<RepliesByPostId<AccountId, BlockNumber>>;
fn get_unlisted_post_ids_by_space_id(
        &self,
        at: Option<BlockHash>,
        space_id: SpaceId
    ) -> Result<Vec<PostId>>;
fn get_public_post_ids_by_space_id(
        &self,
        at: Option<BlockHash>,
        space_id: SpaceId
    ) -> Result<Vec<PostId>>;
fn get_next_post_id(&self, at: Option<BlockHash>) -> Result<PostId>;
fn get_feed(
        &self,
        at: Option<BlockHash>,
        account: AccountId,
        offset: u64,
        limit: u16
    ) -> Result<Vec<FlatPost<AccountId, BlockNumber>>>; 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_posts_by_ids(
    &self,
    at: Option<BlockHash>,
    post_ids: Vec<PostId>,
    offset: u64,
    limit: u16
) -> Result<Vec<FlatPost<AccountId, BlockNumber>>>
[src]

fn get_public_posts(
    &self,
    at: Option<BlockHash>,
    kind_filter: Vec<FlatPostKind>,
    start_id: u64,
    limit: u16
) -> Result<Vec<FlatPost<AccountId, BlockNumber>>>
[src]

fn get_public_posts_by_space_id(
    &self,
    at: Option<BlockHash>,
    space_id: SpaceId,
    offset: u64,
    limit: u16
) -> Result<Vec<FlatPost<AccountId, BlockNumber>>>
[src]

fn get_unlisted_posts_by_space_id(
    &self,
    at: Option<BlockHash>,
    space_id: SpaceId,
    offset: u64,
    limit: u16
) -> Result<Vec<FlatPost<AccountId, BlockNumber>>>
[src]

fn get_reply_ids_by_parent_id(
    &self,
    at: Option<BlockHash>,
    post_id: PostId
) -> Result<Vec<PostId>>
[src]

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

fn get_replies_by_parent_id(
    &self,
    at: Option<BlockHash>,
    parent_id: PostId,
    offset: u64,
    limit: u16
) -> Result<Vec<FlatPost<AccountId, BlockNumber>>>
[src]

fn get_replies_by_parent_ids(
    &self,
    at: Option<BlockHash>,
    parent_ids: Vec<PostId>,
    offset: u64,
    limit: u16
) -> Result<RepliesByPostId<AccountId, BlockNumber>>
[src]

fn get_unlisted_post_ids_by_space_id(
    &self,
    at: Option<BlockHash>,
    space_id: SpaceId
) -> Result<Vec<PostId>>
[src]

fn get_public_post_ids_by_space_id(
    &self,
    at: Option<BlockHash>,
    space_id: SpaceId
) -> Result<Vec<PostId>>
[src]

fn get_next_post_id(&self, at: Option<BlockHash>) -> Result<PostId>[src]

fn get_feed(
    &self,
    at: Option<BlockHash>,
    account: AccountId,
    offset: u64,
    limit: u16
) -> Result<Vec<FlatPost<AccountId, BlockNumber>>>
[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> PostsApi<<Block as Block>::Hash, AccountId, BlockNumber> for Posts<C, Block> where
    Block: BlockT,
    AccountId: Codec,
    BlockNumber: Codec,
    C: Send + Sync + 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>,
    C::Api: PostsRuntimeApi<Block, AccountId, BlockNumber>, 
[src]

Loading content...