Class AddFilesToVersion
java.lang.Object
masecla.modrinth4j.endpoints.generic.Endpoint<EmptyResponse,Map<String,InputStream>>
masecla.modrinth4j.endpoints.version.AddFilesToVersion
This endpoint is used to add files to a version.
-
Constructor Summary
ConstructorsConstructorDescriptionAddFilesToVersion(HttpClient client, com.google.gson.Gson gson) Creates a new instance of this endpoint. -
Method Summary
Modifier and TypeMethodDescriptionReturns the endpoint.Returns the method.com.google.gson.reflect.TypeToken<Map<String, InputStream>> Returns the request class.com.google.gson.reflect.TypeToken<EmptyResponse> Returns the response class.sendRequest(Map<String, InputStream> request, Map<String, String> urlParams) Sends the request.Methods inherited from class masecla.modrinth4j.endpoints.generic.Endpoint
checkBodyForErrors, executeRequest, getReplacedUrl, isJsonBody, readFile, readStream, requiresBody, sendRequest
-
Constructor Details
-
AddFilesToVersion
Creates a new instance of this endpoint.- Parameters:
client- The client to use.gson- The gson instance to use.
-
-
Method Details
-
getEndpoint
Returns the endpoint.- Specified by:
getEndpointin classEndpoint<EmptyResponse,Map<String, InputStream>> - Returns:
- - The endpoint of the request.
-
sendRequest
public CompletableFuture<EmptyResponse> sendRequest(Map<String, InputStream> request, Map<String, String> urlParams) Sends the request.- Overrides:
sendRequestin classEndpoint<EmptyResponse,Map<String, InputStream>> - Parameters:
request- - The request to use.urlParams- - The URL parameters to use.- Returns:
- - A
CompletableFuturethat will return the response.
-
getRequestClass
Returns the request class.- Specified by:
getRequestClassin classEndpoint<EmptyResponse,Map<String, InputStream>> - Returns:
- - The
TypeTokenfor the response.
-
getResponseClass
Returns the response class.- Specified by:
getResponseClassin classEndpoint<EmptyResponse,Map<String, InputStream>> - Returns:
- - The
TypeTokenfor the response.
-
getMethod
Returns the method.- Overrides:
getMethodin classEndpoint<EmptyResponse,Map<String, InputStream>> - Returns:
- - The HTTP method being used
-