Post Report
Used to report a Post/Comment with appropriate reasons.
Steps to Report a Post/Comment
- Create a ReportRequest object using
ReportRequest.builder()
class by passing all the required parameters. - Call
report()
function using the instance ofLMFeedClient
. - 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
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
tagId | Int | Report Tag ID | |
entityId | String | ID of post/comment/reply being reported | |
uuid | String | UUID of user reporting | |
entityType | ReportEntityType | Post/Comment/Reply | |
reason | Int | Reason 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
}