Class CreateVersion
java.lang.Object
masecla.modrinth4j.endpoints.generic.Endpoint<ProjectVersion,CreateVersion.CreateVersionRequest>
masecla.modrinth4j.endpoints.version.CreateVersion
This endpoint is used to create a new version.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis class is used to represent the request. -
Constructor Summary
ConstructorsConstructorDescriptionCreateVersion(HttpClient client, com.google.gson.Gson gson) This constructor is used to create a new instance of the endpoint. -
Method Summary
Modifier and TypeMethodDescriptionReturns the endpoint.Returns the method to use.com.google.gson.reflect.TypeToken<CreateVersion.CreateVersionRequest> Returns the request class to use.com.google.gson.reflect.TypeToken<ProjectVersion> Returns the response class to use.sendRequest(CreateVersion.CreateVersionRequest request, Map<String, String> urlParams) This method will send the request.Methods inherited from class masecla.modrinth4j.endpoints.generic.Endpoint
checkBodyForErrors, executeRequest, getReplacedUrl, isJsonBody, readFile, readStream, requiresBody, sendRequest
-
Constructor Details
-
CreateVersion
This constructor is used to create 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,CreateVersion.CreateVersionRequest> - Returns:
- - The endpoint of the request.
-
sendRequest
public CompletableFuture<ProjectVersion> sendRequest(CreateVersion.CreateVersionRequest request, Map<String, String> urlParams) This method will send the request.- Overrides:
sendRequestin classEndpoint<ProjectVersion,CreateVersion.CreateVersionRequest> - Parameters:
request- - The request to use.urlParams- - The URL parameters to use.- Returns:
- - A
CompletableFuturethat will return the response.
-
getRequestClass
Returns the request class to use.- Specified by:
getRequestClassin classEndpoint<ProjectVersion,CreateVersion.CreateVersionRequest> - Returns:
- - The
TypeTokenof the request.
-
getResponseClass
Returns the response class to use.- Specified by:
getResponseClassin classEndpoint<ProjectVersion,CreateVersion.CreateVersionRequest> - Returns:
- - The
TypeTokenof the response.
-
getMethod
Returns the method to use.- Overrides:
getMethodin classEndpoint<ProjectVersion,CreateVersion.CreateVersionRequest> - Returns:
- - The method to use.
-