Class CheckSlugAvailability
java.lang.Object
masecla.modrinth4j.endpoints.generic.Endpoint<CheckSlugAvailability.CheckSlugAvailabilityResponse,EmptyRequest>
masecla.modrinth4j.endpoints.project.CheckSlugAvailability
public class CheckSlugAvailability
extends Endpoint<CheckSlugAvailability.CheckSlugAvailabilityResponse,EmptyRequest>
This endpoint is used to check if a slug is available.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis class is used to represent the response. -
Constructor Summary
ConstructorsConstructorDescriptionCheckSlugAvailability(HttpClient client, com.google.gson.Gson gson) Creates a new instance of the endpoint. -
Method Summary
Modifier and TypeMethodDescriptionReturns the endpoint.com.google.gson.reflect.TypeToken<EmptyRequest> Returns the request class.com.google.gson.reflect.TypeToken<CheckSlugAvailability.CheckSlugAvailabilityResponse> Returns the response class.booleanReturns if the endpoint requires a body.Methods inherited from class masecla.modrinth4j.endpoints.generic.Endpoint
checkBodyForErrors, executeRequest, getMethod, getReplacedUrl, isJsonBody, readFile, readStream, sendRequest, sendRequest
-
Constructor Details
-
CheckSlugAvailability
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<CheckSlugAvailability.CheckSlugAvailabilityResponse,EmptyRequest> - Returns:
- - The endpoint of the request.
-
getRequestClass
Returns the request class.- Specified by:
getRequestClassin classEndpoint<CheckSlugAvailability.CheckSlugAvailabilityResponse,EmptyRequest> - Returns:
- - The
TypeTokenfor the response.
-
getResponseClass
public com.google.gson.reflect.TypeToken<CheckSlugAvailability.CheckSlugAvailabilityResponse> getResponseClass()Returns the response class.- Specified by:
getResponseClassin classEndpoint<CheckSlugAvailability.CheckSlugAvailabilityResponse,EmptyRequest> - Returns:
- - The
TypeTokenfor the response.
-
requiresBody
public boolean requiresBody()Returns if the endpoint requires a body.- Overrides:
requiresBodyin classEndpoint<CheckSlugAvailability.CheckSlugAvailabilityResponse,EmptyRequest> - Returns:
- - Whether or not the request requires a body.
-