Class VersionFilesEndpoints
java.lang.Object
masecla.modrinth4j.endpoints.version.files.VersionFilesEndpoints
This class is used to represent the endpoints for version files.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeleteFileByHash(FileHash algorithm, String hash) This endpoint is used to delete a file from a project version.getLatestVersionByHash(FileHash algorithm, String hash, GetProjectLatestVersionFromHash.GetProjectLatestVersionFromHashRequest request) This endpoint is used to get the latest version of a project from a hash.getLatestVersionsByHash(GetProjectLatestVersionsFromHashes.GetProjectLatestVersionsFromHashesRequest request) This endpoint is used to get the latest version of a project from a hash.getVersionByHash(FileHash algorithm, String hash) This endpoint is used to get the latest version of a project from a hash.getVersionByHash(FileHash algorithm, String... hashes) This endpoint is used to get the latest version of a project from a hash.getVersionByHash(FileHash algorithm, List<String> hashes) This endpoint is used to get the latest version of a project from a hash.
-
Constructor Details
-
VersionFilesEndpoints
public VersionFilesEndpoints()
-
-
Method Details
-
getVersionByHash
This endpoint is used to get the latest version of a project from a hash.- Parameters:
algorithm- The algorithm to usehash- The hash to use- Returns:
- A
CompletableFuturethat will return the latest version of the project with the given hash.
-
getVersionByHash
public CompletableFuture<HashProjectVersionMap> getVersionByHash(FileHash algorithm, List<String> hashes) This endpoint is used to get the latest version of a project from a hash.- Parameters:
algorithm- - The algorithm to usehashes- - The hashes to use- Returns:
- - A
CompletableFuturethat will return the latest version of the project with the given hash.
-
getVersionByHash
public CompletableFuture<HashProjectVersionMap> getVersionByHash(FileHash algorithm, String... hashes) This endpoint is used to get the latest version of a project from a hash.- Parameters:
algorithm- - The algorithm to usehashes- - The hashes to use- Returns:
- - A
CompletableFuturethat will return the latest version of the project with the given hash.
-
deleteFileByHash
This endpoint is used to delete a file from a project version.- Parameters:
algorithm- The algorithm to usehash- The hash to use- Returns:
- A
CompletableFuturethat will return an empty response.
-
getLatestVersionByHash
public CompletableFuture<ProjectVersion> getLatestVersionByHash(FileHash algorithm, String hash, GetProjectLatestVersionFromHash.GetProjectLatestVersionFromHashRequest request) This endpoint is used to get the latest version of a project from a hash.- Parameters:
algorithm- The algorithm to usehash- The hash to userequest- The request to use- Returns:
- A
CompletableFuturethat will return the latest version of the project with the given hash.
-
getLatestVersionsByHash
public CompletableFuture<HashProjectVersionMap> getLatestVersionsByHash(GetProjectLatestVersionsFromHashes.GetProjectLatestVersionsFromHashesRequest request) This endpoint is used to get the latest version of a project from a hash.- Parameters:
request- The request to use- Returns:
- A
CompletableFuturethat will return the latest version of the project with the given hash.
-