classSource
public final class VersionsClient
    extends AbstractModrinthClient
Superclasses
AbstractModrinthClient

Constructors

public VersionsClient(Modrinth modrinth)
Parameters
modrinthModrinth

Methods

public List<VersionDependency> dependencies(String versionId)
Parameters
versionIdString
Returns
List<VersionDependency>The dependencies of the version, modrinth has no extra route for that, they come with the version
public Version fromHash(String hash)
Parameters
hashStringSha1 or sha512 of a file
Returns
VersionThe version the file belongs to
public List<Version> fromHashes(String... hashes)
Parameters
hashesString[]
Returns
List<Version>The versions the files with these hashes belong to, in the order of the hashes, unknown ones are left out
public Version get(String id)
Parameters
idString
Returns
Version
public List<Version> getByProject(String projectIdOrSlug)
Parameters
projectIdOrSlugString
Returns
List<Version>Every version of the project, newest first
public List<Version> getByProject(String projectIdOrSlug, VersionSearchOptions options)
Parameters
projectIdOrSlugString
optionsVersionSearchOptions
Returns
List<Version>
public List<Version> getMany(String... ids)
Parameters
idsString[]
Returns
List<Version>
public Version getVersionByNumber(String projectIdOrSlug, String versionNumber)
Parameters
projectIdOrSlugString
versionNumberString
Returns
Version
public List<Version> latestFromHashes(String... hashes)
Parameters
hashesString[]
Returns
List<Version>The newest version of the project each file belongs to, no matter the loader or game version
public List<Version> latestFromHashes(VersionSearchOptions options, String... hashes)
Parameters
optionsVersionSearchOptionsOnly the game versions and loaders are used
hashesString[]
Returns
List<Version>The newest version matching the options of the project each file belongs to
public Version resolveLatest(String projectIdOrSlug, VersionSearchOptions options)
Parameters
projectIdOrSlugString
optionsVersionSearchOptions
Returns
Version

Inherited methods

From AbstractModrinthClient13 methods

buildUrl() encode() getArray() getArray() getList() getObject() getObject() getRaw() postObject() query() readJsonArray() readJsonObject() request()

Used by

Methods of other types that accept or return VersionsClient.