SDK Reference
Methods
GetPost

getPost

Return details of a post.

How to use?

const { data, error } = await orbis.getPost(post_id);

Parameters

  • post_id - (stream) ID of the post

Returns

/**
* 'creator_details' returns the full user profile of the creator and
* 'content' returns the full stream content for the post
*/
{
  stream_id: "",
  creator: "did:pkh:...",
  creator_details: {
    did: "did:pkh:...",
    profile: {
      username: "Baptiste",
      pfp: "https://..."
    }
  },
  content: {
    body: "This is the content of the post itself",
    ...
  },
  context: "", /** Can be null or any string */
  context_details: {
    group_id: "...",
    group_details: {
      /** Group details if post was shared in a group */
    },
    channel_id: "...",
    channel_details: {
      /** Channel details if post was shared in a channel */
    },
  },
  master: "k...", /** stream_id of the master post (null or string) */
  reply_to: "k...", /** stream_id for the post if is a reply or null */
  reply_to_details: {
    body: "This is a post being replied to...",
    ...
    /** Content of the stream of the post being replied to */
  },
  count_likes: 0,
  count_haha: 0,
  count_downvotes: 0,
  count_replies: 0
}