Skip to main content

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

VariableTypeDescriptionOptional
successboolAPI success status. Indicates whether the API call was successful.No
errorMessageString?Error message in case of failure. Provides details on what went wrong if the API call was not successful.Yes
dataT?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.