Class GetVersionByHash
java.lang.Object
masecla.modrinth4j.endpoints.generic.Endpoint<ProjectVersion,GetVersionByHash.GetVersionByHashRequest>
masecla.modrinth4j.endpoints.version.files.GetVersionByHash
public class GetVersionByHash
extends Endpoint<ProjectVersion,GetVersionByHash.GetVersionByHashRequest>
This endpoint is used to get the version from a hash.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis class is used to represent the request. -
Constructor Summary
ConstructorsConstructorDescriptionGetVersionByHash(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<GetVersionByHash.GetVersionByHashRequest> Returns the request class.com.google.gson.reflect.TypeToken<ProjectVersion> Returns the response class.booleanWhether or not the request is a json body.Methods inherited from class masecla.modrinth4j.endpoints.generic.Endpoint
checkBodyForErrors, executeRequest, getMethod, getReplacedUrl, readFile, readStream, requiresBody, sendRequest, sendRequest
-
Constructor Details
-
GetVersionByHash
Creates a new instance of the endpoint.- Parameters:
client- The client to use.gson- The gson instance to use.
-
-
Method Details
-
getEndpoint
Returns the endpoint.- Specified by:
getEndpointin classEndpoint<ProjectVersion,GetVersionByHash.GetVersionByHashRequest> - Returns:
- - The endpoint of the request.
-
getRequestClass
public com.google.gson.reflect.TypeToken<GetVersionByHash.GetVersionByHashRequest> getRequestClass()Returns the request class.- Specified by:
getRequestClassin classEndpoint<ProjectVersion,GetVersionByHash.GetVersionByHashRequest> - Returns:
- - The
TypeTokenfor the response.
-
getResponseClass
Returns the response class.- Specified by:
getResponseClassin classEndpoint<ProjectVersion,GetVersionByHash.GetVersionByHashRequest> - Returns:
- - The
TypeTokenfor the response.
-
isJsonBody
public boolean isJsonBody()Whether or not the request is a json body.- Overrides:
isJsonBodyin classEndpoint<ProjectVersion,GetVersionByHash.GetVersionByHashRequest> - Returns:
- - Whether or not the request body should be JSON.
-