LMResponse
The LMResponse<T>
class represents a standardized response format used across the API. It is a generic class where T
denotes the type of data being returned. This class encapsulates the result of an API call, including success status, error messages, and the actual response data.
Properties
Variable | Type | Description | Optional |
---|---|---|---|
success | bool | API success status. Indicates whether the API call was successful. | No |
errorMessage | String? | Error message in case of failure. Provides details on what went wrong if the API call was not successful. | Yes |
data | T? | Response data of type T . Contains the data returned by the API call. | Yes |
Generic Type Parameter
- T: The type of the data returned by the API call. This can be any class or data structure that represents the response data.