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
- Use the
getPendingPostModeration()
function provided by thelmFeedClient
object. - Create an instance of
GetPendingPostModerationRequest
, as shown in the snippet, and pass it to the above method. - 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
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
page | number | Page number for pagination | |
pageSize | number | Number of items per page | ✓ |
GetPendingPostModerationResponse
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
reports | Report[] | List of reports | |
posts | Record<string, Post> | Map of post objects | |
users | Record<string, User> | Map of user objects | |
repostedPosts | Record<string, Post> | Map of reposted posts | |
topics | Record<string, Topic> | Map of topics | |
userTopics | Record<string, Topic> | Map of user topics | |
widgets | Record<string, Widget> | Map of widgets | |
comments | Record<string, Comment> | Map of comments |