API
query
Getposts

ryft.getPosts()

Returns the details of a post.

let { data, error } = await ryft.getPost(post_id);
 

Returns

  {
    stream_id: "cjzl6cwe1...x6iqjwvcb",
    creator: "did:pkh:...",
    creator_details: {
      did: "did:pkh:...",
      profile: {
        username: "Alice",
        pfp: "https://..."
      }
    },
    content: {
      body: "Content of the post itself",
      ...
    },
    context: null,
    context_details: {
      group_id: "...",
      group_details: {
        ...
      },
      channel_id: "...",
      channel_details: {
        ...
      },
    },
    master: "k...",
    reply_to: "k...",
    reply_to_details: {
      body: "Parent post being replied to...",
      ...
    },
    count_likes: 0,
    count_haha: 0,
    count_downvotes: 0,
    count_replies: 0
  }