Post Report
The LikeMinds Android Feed SDK provides the ability to report a Post/Comment with appropriate reasons.
Steps to Report a Post/Comment
- Create a PostReportRequest object using
PostReportRequest.builder()
class by passing all the required parameters. - Call
postReport()
function using the instance ofLMFeedClient
. - 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
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
tagId | Int | Report Tag ID. | |
entityId | String | ID of post/comment/reply being reported. | |
uuid | String | UUID of entity creator. | |
entityType | Int | Post/Comment/Reply | |
reason | String | Reason for Reporting | ✔︎ |
note
Reason To be sent when ReportType is Other