UNPKG

dmclc

Version:

Dolphin Minecraft Launcher Core

63 lines (62 loc) 2.47 kB
import { Got } from "got"; import { Launcher } from "../../../launcher.js"; import { MinecraftVersion } from "../../../version.js"; import { Content, ContentService, ContentType, ContentVersion, Screenshot } from "../ContentService.js"; import { ModrinthFile, ModrinthProject, ModrinthVersionModel } from "./ModrinthModels.js"; export declare const ModrinthSortField: { NEWEST: string; UPDATED: string; RELEVANCE: string; DOWNLOADS: string; FOLLOWS: string; }; export declare class ModrinthContentVersion implements ContentVersion { private model; private got; private launcher; dependencyType: "version"; file: ModrinthFile; content?: ModrinthContent; isVersion: true; constructor(model: ModrinthVersionModel, got: Got, launcher: Launcher); getContent(): Promise<Content>; getVersionFileName(): Promise<string>; getVersionNumber(): Promise<string>; getVersionChangelog(): Promise<string>; listDependencies(): Promise<(ContentVersion | Content)[]>; getVersionFileURL(): Promise<string>; getVersionFileSHA1(): Promise<string>; } export declare class ModrinthContent implements Content { private launcher; private got; private model; constructor(launcher: Launcher, got: Got, model: ModrinthProject); isVersion: false; /** * @internal * @throws RequestError */ static fromSlugOrID(launcher: Launcher, got_: Got, slug: string): Promise<ModrinthContent>; getType(): ContentType; isLibrary(): Promise<boolean>; getBody(): Promise<string>; getScreenshots(): Promise<Screenshot[]>; getTitle(): Promise<string>; getDescription(): Promise<string>; getIconURL(): Promise<string>; getURLs(): Promise<Map<string, string>>; getOtherInformation(): Promise<Map<string, string>>; listVersions(forVersion?: MinecraftVersion | undefined): Promise<ContentVersion[]>; isVanillaOrCanvasShader(): boolean; } export default class ModrinthContentService implements ContentService<string> { private launcher; private got; constructor(launcher: Launcher); getVersionFromFile(path: string): Promise<ContentVersion | null>; getUnsupportedContentTypes(): ContentType[]; getSortFields(): Record<string, string>; getDefaultSortField(): string; searchContent(name: string, skip: number, limit: number, type: ContentType, sortField: string, forVersion?: MinecraftVersion | undefined): Promise<Content[]>; }