Class ErApi

Constructors

Properties

fetcher: KyInstance
getFreeCharacters: ((this, matchMode) => Promise<ErFreeCharactersResponse>) = ...

Type declaration

getLeaderboard: ((this, seasonId, matchmakingTeamType) => Promise<ErLeaderboardResponse>) = ...

Type declaration

getMatchesByMatchId: ((this, matchId, next?) => Promise<ErMatchByUserIdResponse>) = ...

Type declaration

    • (this, matchId, next?): Promise<ErMatchByUserIdResponse>
    • Get match data in each participated user's perspective by the given match id

      Parameters

      • this: ErApi

        ErApi

      • matchId: number

        The match id

      • Optional next: number

        An optional pagination parameter can be retrieved by a previous request

      Returns Promise<ErMatchByUserIdResponse>

      An array of match data in each participated user's perspective

getMatchesByUserId: ((this, userId, next?) => Promise<ErMatchByUserIdResponse>) = ...

Type declaration

    • (this, userId, next?): Promise<ErMatchByUserIdResponse>
    • Get matches joined by the user

      Parameters

      • this: ErApi

        ErApi

      • userId: number

        The user id to query matches

      • Optional next: number

        An optional pagination parameter can be retrieved by a previous request

      Returns Promise<ErMatchByUserIdResponse>

      An array of the match joined by the user

getMetaData: (<T>(this, type, version?) => Promise<ErMetaDataResponse<T>>) = ...

Type declaration

    • <T>(this, type, version?): Promise<ErMetaDataResponse<T>>
    • Get static data for the given metadata namespace

      Type Parameters

      Parameters

      • this: ErApi

        ErApi

      • type: ErMetaTypes

        The static data type to query

      • version: 1 | 2 = 2

        The metadata version; version 1 is deprecated

      Returns Promise<ErMetaDataResponse<T>>

      An array of constants in the specific metadata namespace

getMetaTypes: ((this, version?) => Promise<ErMetaTypesResponse>) = ...

Type declaration

    • (this, version?): Promise<ErMetaTypesResponse>
    • Get available keys for the metadata

      Parameters

      • this: ErApi

        ErApi

      • version: 1 | 2 = 2

        The metadata version; version 1 is deprecated

      Returns Promise<ErMetaTypesResponse>

      An array list of the static data of the game

getRankByUserId: ((this, userId, seasonId, matchmakingTeamType) => Promise<ErRankResponse>) = ...

Type declaration

    • (this, userId, seasonId, matchmakingTeamType): Promise<ErRankResponse>
    • Get a user rank data

      Parameters

      • this: ErApi

        ErApi

      • userId: number

        The user id to query

      • seasonId: number

        The season id to query; current latest is 23

      • matchmakingTeamType: ErMatchmakingTeamTypes

        The match making team type

      Returns Promise<ErRankResponse>

      A user rank data with their mmr

getRecommendedRoutes: ((this, next?) => Promise<ErRecommendedRoutesResponse>) = ...

Type declaration

getRoute: ((this, routeId) => Promise<ErRouteResponse>) = ...

Type declaration

    • (this, routeId): Promise<ErRouteResponse>
    • Get a route by id

      Parameters

      • this: ErApi

        ErApi

      • routeId: number

        The route id to query

      Returns Promise<ErRouteResponse>

      The route with its data

getTranslationPath: ((this, language) => Promise<ErTranslationResponse>) = ...

Type declaration

getUser: ((this, id, season?) => Promise<ErUserResponse>) = ...

Type declaration

    • (this, id, season?): Promise<ErUserResponse>
    • Get user stats by id

      Parameters

      • this: ErApi

        ErApi

      • id: number

        The user id

      • season: number = 0

        The season id; zero for normal game mode

      Returns Promise<ErUserResponse>

      The user stats for the given season

getUserByNickname: ((this, nickname) => Promise<ErUserIdByNicknameResponse>) = ...

Type declaration

queue?: ErApiQueue

Methods

Generated using TypeDoc