Class ChangeProjectIcon
java.lang.Object
masecla.modrinth4j.endpoints.generic.Endpoint<EmptyResponse,ChangeProjectIcon.ChangeProjectIconRequest>
masecla.modrinth4j.endpoints.project.ChangeProjectIcon
public class ChangeProjectIcon
extends Endpoint<EmptyResponse,ChangeProjectIcon.ChangeProjectIconRequest>
This endpoint is used to change the icon of a project.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents the data for a project. -
Constructor Summary
ConstructorsConstructorDescriptionChangeProjectIcon(HttpClient client, com.google.gson.Gson gson) Creates a new instance of the endpoint. -
Method Summary
Modifier and TypeMethodDescriptionGets the endpoint of the request.Returns the method of the request.protected StringgetReplacedUrl(ChangeProjectIcon.ChangeProjectIconRequest request, Map<String, String> parameters) Injects the file extension into the URL.com.google.gson.reflect.TypeToken<ChangeProjectIcon.ChangeProjectIconRequest> Returns the request class.com.google.gson.reflect.TypeToken<EmptyResponse> Returns the response class.sendRequest(ChangeProjectIcon.ChangeProjectIconRequest request, Map<String, String> urlParams) Sends the request.Methods inherited from class masecla.modrinth4j.endpoints.generic.Endpoint
checkBodyForErrors, executeRequest, isJsonBody, readFile, readStream, requiresBody, sendRequest
-
Constructor Details
-
ChangeProjectIcon
Creates a new instance of the endpoint.- Parameters:
client- - The client to use.gson- - The gson instance to use.
-
-
Method Details
-
getEndpoint
Gets the endpoint of the request.- Specified by:
getEndpointin classEndpoint<EmptyResponse,ChangeProjectIcon.ChangeProjectIconRequest> - Returns:
- The endpoint of the request.
-
getRequestClass
public com.google.gson.reflect.TypeToken<ChangeProjectIcon.ChangeProjectIconRequest> getRequestClass()Returns the request class.- Specified by:
getRequestClassin classEndpoint<EmptyResponse,ChangeProjectIcon.ChangeProjectIconRequest> - Returns:
- - The
TypeTokenfor the response.
-
getResponseClass
Returns the response class.- Specified by:
getResponseClassin classEndpoint<EmptyResponse,ChangeProjectIcon.ChangeProjectIconRequest> - Returns:
- - The
TypeTokenfor the response.
-
getReplacedUrl
protected String getReplacedUrl(ChangeProjectIcon.ChangeProjectIconRequest request, Map<String, String> parameters) Injects the file extension into the URL.- Overrides:
getReplacedUrlin classEndpoint<EmptyResponse,ChangeProjectIcon.ChangeProjectIconRequest> - Parameters:
request- - The request to use.parameters- - The parameters to use.- Returns:
- - The replaced URL.
-
sendRequest
public CompletableFuture<EmptyResponse> sendRequest(ChangeProjectIcon.ChangeProjectIconRequest request, Map<String, String> urlParams) Sends the request.- Overrides:
sendRequestin classEndpoint<EmptyResponse,ChangeProjectIcon.ChangeProjectIconRequest> - Parameters:
request- - The request to use.urlParams- - The URL parameters to use.- Returns:
- - A
CompletableFuturethat will return the response.
-
getMethod
Returns the method of the request.- Overrides:
getMethodin classEndpoint<EmptyResponse,ChangeProjectIcon.ChangeProjectIconRequest> - Returns:
- - The method to use.
-