Skip to main content

Get Report Tags

The getReportTags() function is used to fetch the report tags. It takes a GetDeleteReasonRequest as input, which includes the type parameter. The function returns a GetDeleteReasonResponse as a Future.

Steps to Get Report Tags

  1. Create an instance of GetDeleteReasonRequest with the required parameter: type.
  2. Call the getReportTags() function using the instance of the LMFeedClient class, passing the request as a parameter.
  3. Use the response as per your requirement.
// Create an instance of GetDeleteReasonRequest
final GetDeleteReasonRequest getDeleteReasonRequest = (GetDeleteReasonRequestBuilder()
..type(1))
.build();

// Get the response from calling the function
final GetDeleteReasonResponse getDeleteReasonResponse = await lmFeedClient.getReportTags(getDeleteReasonRequest);

// Process the response, as per requirement
if (getDeleteReasonResponse.success) {
// your function to handle successful retrieval of report tags
handleGetReportTagsSuccess(getDeleteReasonResponse.reportTags);
} else {
// your function to handle error message
handleGetReportTagsError(getDeleteReasonResponse.errorMessage);
}

Models

GetDeleteReasonRequest

List of parameters for the GetDeleteReasonRequest class

VariableTypeDescriptionOptional
typeintType identifier for tags

GetDeleteReasonResponse

List of parameters for the GetDeleteReasonResponse class

VariableTypeDescriptionOptional
successboolAPI success status
errorMessageStringError message in case of failure
reportTagsList<DeleteReason>List of report tags