Skip to main content

Get Report Tags

To perform moderation functionalities, like reporting a post, use the getReportTags function. It is used to fetch report tags for moderation.

Steps to Get Report Tags

  1. Create a GetReportTagsRequest object using GetReportTagsRequest.builder() class by passing all the required parameters.
  2. Call getReportTags() function using the instance of LMFeedClient.
  3. Process the response LMResponse<GetReportTagsResponse> as per your requirement.
CoroutineScope(Dispatchers.IO).launch {
// object of GetReportTagsRequest
val getReportTagsRequest = GetReportTagsRequest.Builder()
.type("ENTER REPORT TAG TYPE") // type of report tags to be fetched
// get response (LMResponse<GetReportTagsResponse>)
val response = LMFeedClient.getInstance().getReportTags(getReportTagsRequest)
if (response.success) {
// your function to process the response data
processReportTagsResponse(response.data)
} else {
// your function to process error message
processError(response.errorMessage)
}
}

Models

GetReportTagsRequest

VARIABLETYPEDESCRIPTIONOPTIONAL
typeIntType of the report tags.

GetReportTagsResponse

VARIABLETYPEDESCRIPTIONOPTIONAL
tagsList<ReportTag>List of the report tags.

ReportTag

VARIABLETYPEDESCRIPTIONOPTIONAL
idIntID of the report tag.
nameStringName of the report tag.