Response API

We wrapper all the response from our API by the generic class that has a format like this:
"message": String,
"data": T,
"version": String,
"status": Boolean
T is the dynamic type of data, depending on the API. For example, if you call our API to get a list of your habits, T represents the array of Habits object.
If you failed when calling API, the message field will display the error message, and the status will be false.
Otherwise, the message field will be "Success" and the status will be true.