Class Mapper

Represents a map author/mapper.

Constructors

Properties

mapShowcaseUrl: string

The ddnet.org url to this author's map showcase page.

name: string

The name of this author.

playerUrl: string

The ddnet.org url to this author's player page.

clearCache: (() => Promise<void>) = ...

Clears the Player.cache.

Type declaration

    • (): Promise<void>
    • Clears the CacheManager.store.

      Returns Promise<void>

setTTL: ((ttlMS?: number) => void) = ...

Sets the TTL (Time-To-Live) for objects in cache.

Type declaration

    • (ttlMS?): void
    • Sets the CacheManager.ttl.

      Parameters

      • OptionalttlMS: number

        If provided, sets the CacheManager.ttl to this value, otherwise uses the default value.

      Returns void

Methods

  • Returns an array of releases by this author.

    Parameters

    • Optionaltype: Type

      If provided, the method will only return releases of this type.

    Returns Promise<Release[]>

  • Search for a mapper.

    Parameters

    • value: string

      The value to search for.

    • force: boolean = false

      Wether to bypass the cache.

    Returns Promise<null | {
        mapCount: number;
        name: string;
        toMapper: (() => Mapper);
        toPlayer: (() => Promise<Player>);
    }[]>