UNPKG

modrinth

Version:

JavaScript library for accessing the Modrinth API

26 lines (25 loc) 1.22 kB
import { Modrinth } from ".."; import { ModrinthObject } from "../object"; import { UserSource } from "../structs/UserSource"; import { Mod } from "./Mod"; /** @internal */ export declare type UserSourceOmit = ("created"); export interface User extends Omit<UserSource, UserSourceOmit> { created: Date; } export declare class User extends ModrinthObject<typeof User, User, UserSource> { static get(modrinth: Modrinth, id: string): Promise<User>; static getMultiple(modrinth: Modrinth, ids: string[]): Promise<User[]>; static fetch(modrinth: Modrinth, id: string): Promise<UserSource>; static fetchMultiple(modrinth: Modrinth, ids: string[]): Promise<UserSource[]>; static getObjectLocation(id: string): string; static getResourceLocation(id: string): string; static getCacheKey(id: string): string; static toSource(object: User): Partial<UserSource>; static fromSource(modrinth: Modrinth, source: UserSource): User; static current(modrinth: Modrinth): Promise<User>; static update(modrinth: Modrinth, id: string, update: Partial<User>): Promise<void>; mutate(source: UserSource): User; update(update: Partial<User>): Promise<User>; mods(): Promise<Mod[]>; }