Package dev.mayuna.simpleapi
Class DeserializableApiResponse<T extends WrappedApi>
java.lang.Object
dev.mayuna.simpleapi.ApiResponse<T>
dev.mayuna.simpleapi.DeserializableApiResponse<T>
- Type Parameters:
T- The type of the wrapped API.
- Direct Known Subclasses:
GsonApiResponse
An API response that can be deserialized. Your class must have a constructor without any arguments.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Objectdeserialize(ApiRequest<?> apiRequest, HttpResponse<?> httpResponse) Deserialize the response body into an object of current type.
-
Constructor Details
-
DeserializableApiResponse
public DeserializableApiResponse()
-
-
Method Details
-
deserialize
Deserialize the response body into an object of current type.- Parameters:
apiRequest- The API request.httpResponse- The HTTP response.- Returns:
- The deserialized object.
-