Class GetVersions
java.lang.Object
masecla.modrinth4j.endpoints.generic.Endpoint<List<ProjectVersion>,GetVersions.GetVersionsRequest>
masecla.modrinth4j.endpoints.version.GetVersions
This endpoint is used to get a list of versions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis class is used to represent the request body. -
Constructor Summary
ConstructorsConstructorDescriptionGetVersions(HttpClient client, com.google.gson.Gson gson) Creates a new instance of the endpoint. -
Method Summary
Modifier and TypeMethodDescriptionReturns the endpoint.com.google.gson.reflect.TypeToken<GetVersions.GetVersionsRequest> Returns the request class.com.google.gson.reflect.TypeToken<List<ProjectVersion>> Returns the response class.booleanReturns whether the request body is JSON.Methods inherited from class masecla.modrinth4j.endpoints.generic.Endpoint
checkBodyForErrors, executeRequest, getMethod, getReplacedUrl, readFile, readStream, requiresBody, sendRequest, sendRequest
-
Constructor Details
-
GetVersions
Creates a new instance of the endpoint.- Parameters:
client- The HTTP client to use.gson- The GSON instance to use.
-
-
Method Details
-
getEndpoint
Returns the endpoint.- Specified by:
getEndpointin classEndpoint<List<ProjectVersion>,GetVersions.GetVersionsRequest> - Returns:
- - The endpoint of the request.
-
getRequestClass
Returns the request class.- Specified by:
getRequestClassin classEndpoint<List<ProjectVersion>,GetVersions.GetVersionsRequest> - Returns:
- - The
TypeTokenfor the response.
-
getResponseClass
Returns the response class.- Specified by:
getResponseClassin classEndpoint<List<ProjectVersion>,GetVersions.GetVersionsRequest> - Returns:
- - The
TypeTokenfor the response.
-
isJsonBody
public boolean isJsonBody()Returns whether the request body is JSON.- Overrides:
isJsonBodyin classEndpoint<List<ProjectVersion>,GetVersions.GetVersionsRequest> - Returns:
- - Whether or not the request body should be JSON.
-