Class ModifyGalleryImage
java.lang.Object
masecla.modrinth4j.endpoints.generic.Endpoint<EmptyResponse,ModifyGalleryImage.ModifyGalleryImageRequest>
masecla.modrinth4j.endpoints.project.gallery.ModifyGalleryImage
public class ModifyGalleryImage
extends Endpoint<EmptyResponse,ModifyGalleryImage.ModifyGalleryImageRequest>
This endpoint is used to modify a gallery image.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents the data for a project. -
Constructor Summary
ConstructorsConstructorDescriptionModifyGalleryImage(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(ModifyGalleryImage.ModifyGalleryImageRequest request, Map<String, String> parameters) Injects the file extension into the URL.com.google.gson.reflect.TypeToken<ModifyGalleryImage.ModifyGalleryImageRequest> Returns the request class.com.google.gson.reflect.TypeToken<EmptyResponse> Returns the response class.booleanReturns whether or not the request requires a body.Methods inherited from class masecla.modrinth4j.endpoints.generic.Endpoint
checkBodyForErrors, executeRequest, isJsonBody, readFile, readStream, sendRequest, sendRequest
-
Constructor Details
-
ModifyGalleryImage
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,ModifyGalleryImage.ModifyGalleryImageRequest> - Returns:
- - The endpoint of the request.
-
getReplacedUrl
protected String getReplacedUrl(ModifyGalleryImage.ModifyGalleryImageRequest request, Map<String, String> parameters) Injects the file extension into the URL.- Overrides:
getReplacedUrlin classEndpoint<EmptyResponse,ModifyGalleryImage.ModifyGalleryImageRequest> - Parameters:
request- - The request to use.parameters- - The parameters to use.- Returns:
- - The replaced URL.
-
getMethod
Returns the method.- Overrides:
getMethodin classEndpoint<EmptyResponse,ModifyGalleryImage.ModifyGalleryImageRequest> - Returns:
- - The HTTP method being used
-
getRequestClass
public com.google.gson.reflect.TypeToken<ModifyGalleryImage.ModifyGalleryImageRequest> getRequestClass()Returns the request class.- Specified by:
getRequestClassin classEndpoint<EmptyResponse,ModifyGalleryImage.ModifyGalleryImageRequest> - Returns:
- - The
TypeTokenfor the response.
-
getResponseClass
Returns the response class.- Specified by:
getResponseClassin classEndpoint<EmptyResponse,ModifyGalleryImage.ModifyGalleryImageRequest> - Returns:
- - The
TypeTokenfor the response.
-
requiresBody
public boolean requiresBody()Returns whether or not the request requires a body.- Overrides:
requiresBodyin classEndpoint<EmptyResponse,ModifyGalleryImage.ModifyGalleryImageRequest> - Returns:
- - Whether or not the request requires a body.
-