Skip to main content

Post Report

The LikeMinds Android Feed SDK provides the ability to report a Post/Comment with appropriate reasons.

Steps to Report a Post/Comment

  1. Create a PostReportRequest object using PostReportRequest.builder() class by passing all the required parameters.
  2. Call postReport() function using the instance of LMFeedClient.
  3. Process the response (LMResponse<Nothing>) as per your requirement.
CoroutineScope(Dispatchers.IO).launch {
// object of PostReportRequest
val postReportRequest = PostReportRequest.Builder()
.tagId() // id of the report tag used to report
.entityId("ENTER ENTITY ID") //id of the entity reported
.uuid("ENTER UUID") // uuid of the entity creator
.entityType(5) // type of entity reported (POST = 5, COMMENT = 6, REPLY = 7)
.build()
// get response (LMResponse<Nothing>)
val response = LMFeedClient.getInstance().postReport(postReportRequest)
if (response.success) {
// your function to process the response data
processPostReportResponse(response.data)
} else {
// your function to process error message
processError(response.errorMessage)
}
}

Models

PostReportRequest

VARIABLETYPEDESCRIPTIONOPTIONAL
tagIdIntReport Tag ID.
entityIdStringID of post/comment/reply being reported.
uuidStringUUID of entity creator.
entityTypeIntPost/Comment/Reply
reasonStringReason for Reporting✔︎
note

Reason To be sent when ReportType is Other