Table of Contents

Class StoreItem

Namespace
McServerLauncher.Models.Store
Assembly
McServerLauncher.dll

What the store knows about one thing it can offer, independently of where it came from.

Today everything is a Modrinth mod or plugin, and the two Modrinth shapes (a search hit and a full project) carry the same facts under slightly different names. Tagging and summarising work on this type instead of on either of them, so a shader, a resource pack or a modpack — or a second source altogether — only needs its own conversion, not its own classifier.

public class StoreItem
Inheritance
StoreItem
Inherited Members

Properties

Author

Author name when the source knows it. Search results carry it; the project endpoint doesn't (it returns a team id instead), so an empty value means "look it up", not "no author".

public string Author { get; init; }

Property Value

string

Categories

Raw category slugs, loaders included (that is how Modrinth stores them).

public IReadOnlyList<string> Categories { get; init; }

Property Value

IReadOnlyList<string>

ClientSide

"required", "optional", "unsupported" or "unknown" — null when unknown.

public string? ClientSide { get; init; }

Property Value

string

Description

The author's own one-line summary.

public string Description { get; init; }

Property Value

string

Downloads

public long Downloads { get; init; }

Property Value

long

Followers

public int Followers { get; init; }

Property Value

int

IconUrl

public string? IconUrl { get; init; }

Property Value

string

Id

public string Id { get; init; }

Property Value

string

NeedsClient

True when players must install it too, not only the server.

public bool NeedsClient { get; }

Property Value

bool

ProjectType

"mod", "plugin"… Empty when the source didn't say.

public string ProjectType { get; init; }

Property Value

string

ServerSide

"required", "optional", "unsupported" or "unknown" — null when unknown.

public string? ServerSide { get; init; }

Property Value

string

Slug

public string Slug { get; init; }

Property Value

string

Title

public string Title { get; init; }

Property Value

string

Updated

public DateTimeOffset? Updated { get; init; }

Property Value

DateTimeOffset?

Methods

From(ProjectDetail)

public static StoreItem From(ProjectDetail project)

Parameters

project ProjectDetail

Returns

StoreItem

From(ProjectResult)

public static StoreItem From(ProjectResult hit)

Parameters

hit ProjectResult

Returns

StoreItem