HangarUpstream

data class HangarUpstream(val projectId: String, val baseUrl: String? = "https://hangar.papermc.io/api/v1/", val baseUrlEndpoint: String? = "/latest?channel={classifier}", val releaseBaseUrl: String? = "https://hangar.papermc.io/", val releaseBaseUrlEndpoint: String? = "/versions/{version}", val upstreamPriority: Priority = 0.priority) : Upstream

The Hangar upstream.

Constructors

Link copied to clipboard
constructor(projectId: String, baseUrl: String? = "https://hangar.papermc.io/api/v1/", baseUrlEndpoint: String? = "/latest?channel={classifier}", releaseBaseUrl: String? = "https://hangar.papermc.io/", releaseBaseUrlEndpoint: String? = "/versions/{version}", 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

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.