Package ch.andre601.fluxpoint4j.request
Interface GenericAPIResponse
-
- All Known Implementing Classes:
FailedAPIResponse
,GeneratedImage
,MCServerPingResponse
public interface GenericAPIResponse
A generic interface used for the responses of the API.
A response can be both successfull or non-successful and this interface is used to have a more generic type returned.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getCode()
The returned status code.@Nullable java.lang.String
getMessage()
A possible response message.
-
-
-
Method Detail
-
getCode
int getCode()
The returned status code.
Anything that isn't a 2xx response should be counted as a failed request.- Returns:
- The status code of the API response.
-
getMessage
@Nullable @Nullable java.lang.String getMessage()
A possible response message. This is usually empty/null value for successful responses as usually only failed ones will have a message in it.- Returns:
- Possibly-null or empty message from the API response.
-
-