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
- Create an instance of
GetDeleteReasonRequest
with the required parameter:type
. - Call the
getReportTags()
function using the instance of theLMFeedClient
class, passing the request as a parameter. - 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
Variable | Type | Description | Optional |
---|---|---|---|
type | int | Type identifier for tags |
GetDeleteReasonResponse
List of parameters for the GetDeleteReasonResponse
class
Variable | Type | Description | Optional |
---|---|---|---|
success | bool | API success status | |
errorMessage | String | Error message in case of failure | ✔ |
reportTags | List<DeleteReason > | List of report tags | ✔ |