Currently it looks like you're only able to check leaderboard stats on a user-to-user basis, but being able to pull information directly from a leaderboard as a object list of players including nickname and score values would be nice.
Example for the game Rivals of Aether:
appID = 383980;leaderboardID = 2222327;
the code for checking a leaderboard would probably be something like:
steam.getGameLeaderboards(appID).then(lb => {console.log(lb); //object list of leaderboard ID's for game});
steam.getGameLeaderboard(leaderboardID, appID).then(lb => {/* lb would be an object of players in the top 200 list on the leaderboard */console.log(lb.player[0].nickname, lb.player[0].score); //expected output: "No Love Deep Weeb, 2386"});
The leaderboardID corresponds to "Ranked Season 3 Leaderboard" for the game "Rivals of Aether".
Under user stats, a player's score on this leaderboard is listed as player.stats.ranked3_score for that player. Link to leaderboard here: https://steamcommunity.com/stats/383980/leaderboards/2222327
Currently it looks like you're only able to check leaderboard stats on a user-to-user basis, but being able to pull information directly from a leaderboard as a object list of players including nickname and score values would be nice.
Example for the game Rivals of Aether:
appID = 383980;
leaderboardID = 2222327;
the code for checking a leaderboard would probably be something like:
steam.getGameLeaderboards(appID).then(lb => {
console.log(lb); //object list of leaderboard ID's for game
});
steam.getGameLeaderboard(leaderboardID, appID).then(lb => {
/* lb would be an object of players in the top 200 list on the leaderboard */
console.log(lb.player[0].nickname, lb.player[0].score); //expected output: "No Love Deep Weeb, 2386"
});
The leaderboardID corresponds to "Ranked Season 3 Leaderboard" for the game "Rivals of Aether". Under user stats, a player's score on this leaderboard is listed as player.stats.ranked3_score for that player. Link to leaderboard here: https://steamcommunity.com/stats/383980/leaderboards/2222327