adds forge support, fixes some critical errors
This commit is contained in:
@@ -74,6 +74,13 @@ export type ModrinthProject = {
|
||||
monetization_status: string;
|
||||
};
|
||||
|
||||
export type ModrinthGameVersion = {
|
||||
version: string;
|
||||
version_type: string;
|
||||
data: string;
|
||||
major: boolean;
|
||||
}
|
||||
|
||||
export class Modrinth {
|
||||
static apiRoot = "https://api.modrinth.com/v2";
|
||||
|
||||
@@ -109,4 +116,9 @@ export class Modrinth {
|
||||
const res = await fetch(this.apiRoot + "/project/" + id);
|
||||
return await res.json() as ModrinthProject;
|
||||
}
|
||||
|
||||
static async getGameVersions() {
|
||||
const res = await fetch(this.apiRoot + '/tag/game_version');
|
||||
return await res.json() as ModrinthGameVersion[];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user