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
- Create a GetReportTagsRequest object using
GetReportTagsRequest.builder()
class by passing all the required parameters. - Call
getReportTags()
function using the instance ofLMFeedClient
. - 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
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
type | Int | Type of the report tags. |
GetReportTagsResponse
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
tags | List<ReportTag> | List of the report tags. |
ReportTag
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
id | Int | ID of the report tag. | |
name | String | Name of the report tag. |