Skip to main content

Post Report

Used to report a Post/Comment with appropriate reasons.

Steps to Report a Post/Comment

  1. Create a ReportRequest object using ReportRequest.builder() class by passing all the required parameters.
  2. Call report() function using the instance of LMFeedClient.
  3. Process the response LMResponse<NoData> as per your requirement.
// object of ReportRequest
let request = ReportRequest.builder()
.tagId(tagId) // Report Tag ID
.uuid(uuid) // UUID of user Reporting
.entityId(entityId) // ID of post/comment/reply being reported
.entityType(entityType) // Post/Comment/Reply
.build()

LMFeedClient.shared.getReportTags(request) { response in
// response (LMResponse<GetReportTagResponse>)
if (response.success) {
// your function to process the response data
processResponse(response.data)
} else {
// your function to process error message
processError(response.errorMessage)
}
}

Models

Get Report Tags Request

VARIABLETYPEDESCRIPTIONOPTIONAL
tagIdIntReport Tag ID
entityIdStringID of post/comment/reply being reported
uuidStringUUID of user reporting
entityTypeReportEntityTypePost/Comment/Reply
reasonIntReason for Reporting✔︎
note

Reason To be sent when ReportType is Other

ReportEntityType

public enum ReportEntityType: Int {
case post = 5
case comment = 6
case reply = 7
}