Skip to main content

Get Pending Post Moderation

To fetch pending posts for moderation, use the getPendingPostModeration() function. This function retrieves posts that require moderation.

Steps to Get Pending Post Moderation

  1. Use the getPendingPostModeration() function provided by the lmFeedClient object.
  2. Create an instance of GetPendingPostModerationRequest, as shown in the snippet, and pass it to the above method.
  3. Use the response as per your requirement.
import GetPendingPostModerationRequest from "../requests/getPendingPostModerationRequest";

try {
const getPendingPostModerationRequest =
GetPendingPostModerationRequest.builder()
.setPage(pageNumber) // Page number to fetch
.setPageSize(pageSize) // Number of items per page
.build();
const response = await lmFeedClient.getPendingPostModeration(
getPendingPostModerationRequest
);
// Use the response as per your requirement.
} catch (error) {
// Handle the error as per your requirement.
}

Models

GetPendingPostModerationRequest

VARIABLETYPEDESCRIPTIONOPTIONAL
pagenumberPage number for pagination
pageSizenumberNumber of items per page

GetPendingPostModerationResponse

VARIABLETYPEDESCRIPTIONOPTIONAL
reportsReport[]List of reports
postsRecord<string, Post>Map of post objects
usersRecord<string, User>Map of user objects
repostedPostsRecord<string, Post>Map of reposted posts
topicsRecord<string, Topic>Map of topics
userTopicsRecord<string, Topic>Map of user topics
widgetsRecord<string, Widget>Map of widgets
commentsRecord<string, Comment>Map of comments