ModrinthUpstream

data class ModrinthUpstream(val projectId: String, val modrinthProjectType: ModrinthProjectType, val baseUrl: String? = "https://api.modrinth.com/v2/", val baseUrlEndpoint: String? = "project/", val releaseBaseUrl: String? = "https://modrinth.com/", val releaseBaseUrlEndpoint: String? = "/", val upstreamPriority: Priority = 0.priority) : Upstream

The Modrinth upstream.

Constructors

Link copied to clipboard
constructor(projectId: String, modrinthProjectType: ModrinthProjectType, baseUrl: String? = "https://api.modrinth.com/v2/", baseUrlEndpoint: String? = "project/", releaseBaseUrl: String? = "https://modrinth.com/", releaseBaseUrlEndpoint: String? = "/", upstreamPriority: Priority = 0.priority)

Properties

Link copied to clipboard
open override val baseUrl: String?

The url that is used as a base for all api requests

Link copied to clipboard
open override val baseUrlEndpoint: String?

The endpoint from where the data is requested [baseUrl+baseUrlEndpoint]

Link copied to clipboard
Link copied to clipboard

Id of the project

Link copied to clipboard
open override val releaseBaseUrl: String?

The url that is used as a base for all releases

Link copied to clipboard
open override val releaseBaseUrlEndpoint: String?

The endpoint where the release should lead to [baseUrl+baseUrlEndpoint]

Link copied to clipboard
open override val upstreamPriority: Priority

Priority is that used when comparing versions from multiple upstreams.

Functions

Link copied to clipboard
open operator override fun compareTo(other: Upstream): Int
Link copied to clipboard
open suspend override fun fetch(client: HttpClient, schema: UpdateSchema): DefaultVersion?

Fetches a version object from the upstream.

Link copied to clipboard
open override fun toVersion(version: String, schema: UpdateSchema): DefaultVersion

Converts a version string into a DefaultVersion.

Link copied to clipboard
open override fun update(version: Version): DefaultUpdate

Returns an Update from a DefaultVersion.