Class CreateProject
java.lang.Object
masecla.modrinth4j.endpoints.generic.Endpoint<Project,CreateProject.CreateProjectRequest>
masecla.modrinth4j.endpoints.project.CreateProject
This endpoint is used to create a new project.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents the request to create a project.static classRepresents the data for a project. -
Constructor Summary
ConstructorsConstructorDescriptionCreateProject(HttpClient client, com.google.gson.Gson gson) Creates a new instance of the endpoint. -
Method Summary
Modifier and TypeMethodDescriptionReturns the endpoint.Returns the method.com.google.gson.reflect.TypeToken<CreateProject.CreateProjectRequest> Returns the request class.com.google.gson.reflect.TypeToken<Project> Returns the response class.sendRequest(CreateProject.CreateProjectRequest parameters, Map<String, String> urlParams) Sends the request.Methods inherited from class masecla.modrinth4j.endpoints.generic.Endpoint
checkBodyForErrors, executeRequest, getReplacedUrl, isJsonBody, readFile, readStream, requiresBody, sendRequest
-
Constructor Details
-
CreateProject
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<Project,CreateProject.CreateProjectRequest> - Returns:
- - The endpoint of the request.
-
getMethod
Returns the method.- Overrides:
getMethodin classEndpoint<Project,CreateProject.CreateProjectRequest> - Returns:
- - The HTTP method being used
-
getRequestClass
Returns the request class.- Specified by:
getRequestClassin classEndpoint<Project,CreateProject.CreateProjectRequest> - Returns:
- - The
TypeTokenfor the response.
-
getResponseClass
Returns the response class.- Specified by:
getResponseClassin classEndpoint<Project,CreateProject.CreateProjectRequest> - Returns:
- - The
TypeTokenfor the response.
-
sendRequest
public CompletableFuture<Project> sendRequest(CreateProject.CreateProjectRequest parameters, Map<String, String> urlParams) Sends the request.- Overrides:
sendRequestin classEndpoint<Project,CreateProject.CreateProjectRequest> - Parameters:
parameters- - The request to use.urlParams- - The URL parameters to use.- Returns:
- - A
CompletableFuturethat will return the response.
-