Social Media Replies

social-media/replies@1.0.1
Supported by 1 provider
L

Get Post Replies

Get replies (comments) on a social media post, comment, or a reply.

Input
Parent ID
Page
Result
Previous page
Next page
Replies

1.Choose a provider

2.Use GetPostReplies with mock in your code

npm i @superfaceai/one-sdk
const { SuperfaceClient } = require('@superfaceai/one-sdk');

const sdk = new SuperfaceClient();

async function run() {
  // Load the profile
  const profile = await sdk.getProfile('social-media/replies@1.0.1');

  // Use the profile
  const result = await profile
    .getUseCase('GetPostReplies')
    .perform({
      parentId: 'be7cdc05-4264-4d47-bc1f-af704d6abf32'
    }, {
      provider: 'mock'
    });

  // Handle the result
  try {
    const data = result.unwrap();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

run();

Structure details

Input (object)

parentId
Identifier of the parent post to get replies for.
page
Pagination cursor (obtained from `previousPage` or `nextPage`).

Example

{
  "parentId": "be7cdc05-4264-4d47-bc1f-af704d6abf32"
}

Result (object)

previousPage
Previous page cursor.
nextPage
Next page cursor.
replies
List of replies under the post.

Example

{
  "replies": [
    {
      "id": "123",
      "createdAt": "2022-06-09T13:29:11+02:00",
      "authorId": "@alberteinstein",
      "authorName": "Albert Einstein",
      "text": "Hello, World!"
    }
  ]
}

Implementation details

Provider
mock
Use case
GetPostReplies
Author
@superface
Source
Verified