SpigotUpstream

data class SpigotUpstream(val projectId: String, val baseUrl: String? = "https://api.spigotmc.org/legacy/", val baseUrlEndpoint: String? = "update.php?resource=", val releaseBaseUrl: String? = "https://www.spigotmc.org/", val releaseBaseUrlEndpoint: String? = "resources/", val upstreamPriority: Priority = 0.priority) : Upstream

The Spigot upstream.

Constructors

Link copied to clipboard
constructor(projectId: String, baseUrl: String? = "https://api.spigotmc.org/legacy/", baseUrlEndpoint: String? = "update.php?resource=", releaseBaseUrl: String? = "https://www.spigotmc.org/", releaseBaseUrlEndpoint: String? = "resources/", 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.