Class ChangeUserIcon
java.lang.Object
masecla.modrinth4j.endpoints.generic.Endpoint<EmptyResponse,ChangeUserIcon.ChangeUserIconRequest>
masecla.modrinth4j.endpoints.user.ChangeUserIcon
This endpoint is used to change the icon of a user.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis class is used to represent the request. -
Constructor Summary
ConstructorsConstructorDescriptionChangeUserIcon(HttpClient client, com.google.gson.Gson gson) Creates a new instance of the endpoint. -
Method Summary
Modifier and TypeMethodDescriptionReturns the endpoint.Returns the method.protected StringgetReplacedUrl(ChangeUserIcon.ChangeUserIconRequest request, Map<String, String> parameters) Injects the file extension into the URL.com.google.gson.reflect.TypeToken<ChangeUserIcon.ChangeUserIconRequest> Returns the request class.com.google.gson.reflect.TypeToken<EmptyResponse> Returns the response class.sendRequest(ChangeUserIcon.ChangeUserIconRequest 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
-
ChangeUserIcon
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<EmptyResponse,ChangeUserIcon.ChangeUserIconRequest> - Returns:
- - The endpoint of the request.
-
getRequestClass
Returns the request class.- Specified by:
getRequestClassin classEndpoint<EmptyResponse,ChangeUserIcon.ChangeUserIconRequest> - Returns:
- - The
TypeTokenfor the response.
-
getResponseClass
Returns the response class.- Specified by:
getResponseClassin classEndpoint<EmptyResponse,ChangeUserIcon.ChangeUserIconRequest> - Returns:
- - The
TypeTokenfor the response.
-
getReplacedUrl
protected String getReplacedUrl(ChangeUserIcon.ChangeUserIconRequest request, Map<String, String> parameters) Injects the file extension into the URL.- Overrides:
getReplacedUrlin classEndpoint<EmptyResponse,ChangeUserIcon.ChangeUserIconRequest> - Parameters:
request- - The request to use.parameters- - The parameters to use.- Returns:
- - The replaced URL.
-
sendRequest
public CompletableFuture<EmptyResponse> sendRequest(ChangeUserIcon.ChangeUserIconRequest request, Map<String, String> urlParams) Sends the request.- Overrides:
sendRequestin classEndpoint<EmptyResponse,ChangeUserIcon.ChangeUserIconRequest> - Parameters:
request- - The request to use.urlParams- - The URL parameters to use.- Returns:
- - A
CompletableFuturethat will return the response.
-
getMethod
Returns the method.- Overrides:
getMethodin classEndpoint<EmptyResponse,ChangeUserIcon.ChangeUserIconRequest> - Returns:
- - The HTTP method being used
-