Options
All
  • Public
  • Public/Protected
  • All
Menu

Service used for interacting with posts on a federated host.

Hierarchy

  • PostsFederationService

Index

Constructors

constructor

Methods

create

  • create(username: string, host: string, post: CreatePostProps): Promise<Post>

delete

  • delete(username: string, host: string, id: string): Promise<void>
  • Deletes a post by its ID.

    Parameters

    • username: string

      The username of the user deleting the post.

    • host: string

      The host from which to delete the post.

    • id: string

      The ID of the post to delete.

    Returns Promise<void>

getByCommunity

  • getByCommunity(username: string, host: string, community: string): Promise<Post[]>
  • Gets all the posts in a community.

    Parameters

    • username: string

      The username of the user getting the post.

    • host: string

      The host from which to get the posts.

    • community: string

      ID of the community to obtain the posts from.

    Returns Promise<Post[]>

    All posts in the community.

getById

  • getById(username: string, host: string, id: string): Promise<Post>
  • Gets a post by its ID.

    Parameters

    • username: string

      The username of the user getting the post.

    • host: string

      The host from which to get the post.

    • id: string

      The ID of the post to get.

    Returns Promise<Post>

    The obtained Post.

update

  • update(username: string, host: string, post: UpdatePostProps): Promise<Post>

Generated using TypeDoc