UNPKG

ddnet

Version:

A typescript npm package for interacting with data from ddnet.org

90 lines (89 loc) 2.02 kB
import { RankAvailableRegion, Tile, Type } from '../../util.js'; import { Map } from '../maps/Map.js'; import { Mapper } from '../maps/Mapper.js'; /** * Represents a map release. */ export declare class Release { /** * The name of this map. */ name: string; /** * The type of this map. */ type: Type; /** * The url of this map on ddnet.org */ url: string; /** * The direct url of this map's thumbnail image. */ thumbnailUrl: string; /** * The url to the interactive web preview of this map. */ webPreviewUrl: string; /** * Amount of points awarded for completing this map. */ points: number; /** * Star difficulty of this map. */ difficulty: number; /** * Authors of this map. */ mappers: Mapper[]; /** * Release timestamp of this map. */ releasedTimestamp: number | null; /** * The width of this map. */ width: number; /** * The height of this map. */ height: number; /** * Array of tiles used in this map. */ tiles: Tile[]; /** * Construct a new {@link Release} instance. */ constructor(data: { type: string; name: string; website: string; thumbnail: string; web_preview: string; points: number; difficulty: number; mapper: string; releaseTimestamp: number; width: number; height: number; tiles: string[]; }); /** * Returns a new {@link Map} object from the {@link name} of this release. */ toMap( /** * The region to pull ranks from in the `toMap` function from the returned value. Omit for global ranks. */ rankSource?: RankAvailableRegion | null, /** * Wether to bypass the cache. */ force?: boolean): Promise<Map>; /** * Returns the name and url of this release in markdown format. */ toString(): string; }