BeatLeader.Players. Scores

Interact with the BeatLeader Player Scores API endpoints. Get player score related info.

Methods

(static) getAccGraph(id, accGraphOptions) → {Promise}

Retrieves accuracy graph data

Parameters:
NameTypeDescription
idstring

ID of user to get data for

accGraphOptionsObject

Filters to narrow search Certainly! Here's the table:

ParameterTypeDescriptionValid Values
typestring(Optional) Type of sorting"acc", "rank", "weight", "pp"
leaderboardContextLeaderboardContexts(Optional) Context of the leaderboardAs defined in the LeaderboardContexts type
no_unranked_starsboolean(Optional) Whether to include unranked starstrue (include unranked stars), false (exclude unranked stars)
Returns:

Returns a promise with acc graph data

Type: 
Promise

(static) getById(id, scoresSearchOptions) → {Promise}

Fetches a list of scores for a specific user based on filters

Parameters:
NameTypeDescription
idstring

ID of user to get data for

scoresSearchOptionsObject

Filters to narrow search results. See table below.

ParameterTypeDescriptionValid Values
sortByScoresSortBy(Optional) Sorting criteria0, 1, 2, 3, 4, 5, 6, 7, 8, "date", "pp", "acc", "pauses", "rank", "maxStreak", "mistakes", "weight", "weightedPp"
orderOrder(Optional) Sorting order"asc", "desc"
pagenumber(Optional) Page numberN/A
countnumber(Optional) Number of items per pageN/A
searchstring(Optional) Search queryN/A
diffstring(Optional) Difficulty level"Easy", "Normal", "Hard", "Expert", "ExpertPlus"
modestring(Optional) Mode of item"Standard", "OneSaber", "90Degree", "360Degree"
requirementsRequirements(Optional) RequirementsN/A
scoreStatusScoreFilterStatus(Optional) Score statusN/A
leaderboardContextLeaderboardContests(Optional) Context of the leaderboardN/A
typeDifficultyStatus(Optional) Type of difficultyN/A
modifiersstring(Optional) ModifiersN/A
stars_fromnumber(Optional) Minimum starsN/A
stars_tonumber(Optional) Maximum starsN/A
time_fromnumber(Optional) Start timeN/A
time_tonumber(Optional) End timeN/A
eventIdnumber(Optional) Event IDN/A
Returns:

Returns a promise with scores

Type: 
Promise

(static) getCompactById(id, scoresSearchOptions)

Retrieves a paginated list of scores for a specific user

Parameters:
NameTypeDescription
idstring

ID of user to get data for

scoresSearchOptionsObject

Filters to narrow search results

ParameterTypeDescriptionValid Values
sortByScoresSortBy(Optional) Sorting criteria0, 1, 2, 3, 4, 5, 6, 7, 8, "date", "pp", "acc", "pauses", "rank", "maxStreak", "mistakes", "weight", "weightedPp"
orderOrder(Optional) Sorting order"asc", "desc"
pagenumber(Optional) Page numberN/A
countnumber(Optional) Number of items per pageN/A
searchstring(Optional) Search queryN/A
diffstring(Optional) Difficulty level"Easy", "Normal", "Hard", "Expert", "ExpertPlus"
modestring(Optional) Mode of item"Standard", "OneSaber", "90Degree", "360Degree"
requirementsRequirements(Optional) RequirementsN/A
scoreStatusScoreFilterStatus(Optional) Score statusN/A
leaderboardContextLeaderboardContests(Optional) Context of the leaderboardN/A
typeDifficultyStatus(Optional) Type of difficultyN/A
modifiersstring(Optional) ModifiersN/A
stars_fromnumber(Optional) Minimum starsN/A
stars_tonumber(Optional) Maximum starsN/A
time_fromnumber(Optional) Start timeN/A
time_tonumber(Optional) End timeN/A
eventIdnumber(Optional) Event IDN/A
Returns:

Returns a promise with compacted score data

(static) getCompactHistory(id, leaderboardContext, count) → {Promise}

Parameters:
NameTypeDescription
idstring

ID of user to get data for

leaderboardContextstring

Filter scores by leaderboard context, default is 'General'. Available values : "none", "general", "noMods", "noPause", "golf", "sCPM", "speedrun", "speedrunBackup"

countnumber

Amount of days to include. Default is 50

Returns:

Returns a promise with compacted history

Type: 
Promise

(static) getHistory(id, leaderboardContext, count) → {Promise}

Retrieves a lkist of players performance metrics and statistics

Parameters:
NameTypeDescription
idstring

ID of user to get data for

leaderboardContextstring

Filter scores by leaderboard context, default is 'General'. Available values : "none", "general", "noMods", "noPause", "golf", "sCPM", "speedrun", "speedrunBackup"

countnumber

Amount of days to include. Default is 50

Returns:

Returns a promise with metrics and statistics

Type: 
Promise

(static) getPinnedScores(id, leaderboardContext) → {Promise}

Retrieves a paginated list of pinned scores for a specific user

Parameters:
NameTypeDescription
idstring

ID of user to get data for

leaderboardContextstring

Filter scores by leaderboard context, default is 'General'. Available values : "none", "general", "noMods", "noPause", "golf", "sCPM", "speedrun", "speedrunBackup"

Returns:

Returns a promise with a list of pinned score data

Type: 
Promise

(static) getScore(id, hash, difficulty, mode) → {Promise.<number>}

Gets a score made my a player on a specific map of a specific difficulty

Parameters:
NameTypeDescription
idstring

ID of user to get data for

hashstring

Map hash

difficultystring

Difficuly to get score from

modestring

Maps characterists. "Standard", "OneSaber", "90Degree", "360Degree"

Returns:

Returns a promise with the score

Type: 
Promise.<number>