Class CreateGalleryImage
java.lang.Object
masecla.modrinth4j.endpoints.generic.Endpoint<EmptyResponse,CreateGalleryImage.CreateGalleryImageRequest>
masecla.modrinth4j.endpoints.project.gallery.CreateGalleryImage
public class CreateGalleryImage
extends Endpoint<EmptyResponse,CreateGalleryImage.CreateGalleryImageRequest>
This endpoint is used to create a new image in a project's gallery.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents the request data for this endpoint. -
Constructor Summary
ConstructorsConstructorDescriptionCreateGalleryImage(HttpClient client, com.google.gson.Gson gson) Creates a new instance of the endpoint. -
Method Summary
Modifier and TypeMethodDescriptionGets the endpoint of the request.Gets the method of the request.com.google.gson.reflect.TypeToken<CreateGalleryImage.CreateGalleryImageRequest> Returns the class of the request.com.google.gson.reflect.TypeToken<EmptyResponse> Returns the class of the response.sendRequest(CreateGalleryImage.CreateGalleryImageRequest parameters, Map<String, String> urlParams) Gets the type token of the response.Methods inherited from class masecla.modrinth4j.endpoints.generic.Endpoint
checkBodyForErrors, executeRequest, getReplacedUrl, isJsonBody, readFile, readStream, requiresBody, sendRequest
-
Constructor Details
-
CreateGalleryImage
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,CreateGalleryImage.CreateGalleryImageRequest> - Returns:
- The endpoint of the request.
-
getMethod
Gets the method of the request.- Overrides:
getMethodin classEndpoint<EmptyResponse,CreateGalleryImage.CreateGalleryImageRequest> - Returns:
- The method of the request.
-
sendRequest
public CompletableFuture<EmptyResponse> sendRequest(CreateGalleryImage.CreateGalleryImageRequest parameters, Map<String, String> urlParams) Gets the type token of the response.- Overrides:
sendRequestin classEndpoint<EmptyResponse,CreateGalleryImage.CreateGalleryImageRequest> - Parameters:
parameters- - The request to use.urlParams- - The URL parameters to use.- Returns:
- The type token of the response.
-
getRequestClass
public com.google.gson.reflect.TypeToken<CreateGalleryImage.CreateGalleryImageRequest> getRequestClass()Returns the class of the request.- Specified by:
getRequestClassin classEndpoint<EmptyResponse,CreateGalleryImage.CreateGalleryImageRequest> - Returns:
- - The
TypeTokenof the request.
-
getResponseClass
Returns the class of the response.- Specified by:
getResponseClassin classEndpoint<EmptyResponse,CreateGalleryImage.CreateGalleryImageRequest> - Returns:
- - The
TypeTokenof the response.
-