Table of Contents

Class GeyserDownloadsApi

Namespace
McServerLauncher.Services
Assembly
McServerLauncher.dll

GeyserMC's downloads API, which the app reads for Floodgate and for Hydraulic.

public static class GeyserDownloadsApi
Inheritance
GeyserDownloadsApi
Inherited Members

Remarks

The shape is the same for every project they publish: /{project} lists versions, /versions/{version} lists builds, and /versions/{version}/builds/{build} lists one download per platform, each with its name and its SHA-256. It was walked in two places with two implementations, and they had drifted: one took the newest build and gave up if it carried no download for the platform, the other walked backwards until it found one.

Walking backwards is the correct behaviour and is now what both do. Builds are published per commit and a given one may carry no artifact for a platform at all — taking the newest blindly is how the NeoForge situation was first misread.

Methods

LatestAsync(string, string, CancellationToken)

The newest build of project that publishes a download for platform, or null when none of the recent ones does.

public static Task<GeyserDownloadsApi.Artifact?> LatestAsync(string project, string platform, CancellationToken ct = default)

Parameters

project string
platform string
ct CancellationToken

Returns

Task<GeyserDownloadsApi.Artifact>

Remarks

A download with no SHA-256 is skipped rather than returned: the app's rule everywhere is that nothing is installed without its checksum, and returning one here would push that decision out to callers who would each have to remember it.

OpenAsync(Artifact, CancellationToken)

Opens the artifact's download stream. The caller verifies and stores it.

public static Task<HttpResponseMessage> OpenAsync(GeyserDownloadsApi.Artifact artifact, CancellationToken ct = default)

Parameters

artifact GeyserDownloadsApi.Artifact
ct CancellationToken

Returns

Task<HttpResponseMessage>