ShyyTAUI/src/lib/taDocs/3-client-getLeaderboard.md

1.6 KiB

The taClient.getLeaderboard() method

This documents the taClient.getLeaderboard() method.

info
Async: This is a method you would want to use await with

This method has input parameters. The function could easily be defined as:

async function getLeaderboard(qualifierId: string, mapId: string): Promise<Response> {
    // backend logic
}

Parameters:

  • qualifierId (string): The GUID of the qualifier event
  • mapId (string): The GUID of the map within the qualifier for which to retrieve the leaderboard

General usage:

const response: Response = taClient.getLeaderboard(qualifierGuid, mapGuid);

If you have not yet, please read Client -> Introduction to the Client

Standard Response:

{
    details: {
        getLeaderboard: Response_GetLeaderboard,
        oneofKind: 'getLeaderboard'
    },
    respondingToPacketId: 'packet-guid-uuidv4',
    type: Response_ResponseType
}
info
Note: This method retrieves the complete leaderboard for a specific map within a qualifier event, including all player scores sorted according to the leaderboard sort settings.