Leaderboard
Scoring information for a group of players
Fetch a given leaderboard
fetch('https://api.placeholderjson.dev/leaderboard/1')
.then(response => response.json())
.then(json => console.log(json))
// Return
[
{
"name": "sarmitage0",
"score": 144223,
"icon": "https://robohash.org/nostrumsintfugit.png?size=150x150&set=set1"
},
{
"name": "chuygens7",
"score": 141050,
"icon": "https://robohash.org/molestiasatnatus.png?size=150x150&set=set1"
},
{
"name": "lwhimpenny4",
"score": 121593,
"icon": "https://robohash.org/ullamtemporaveniam.png?size=150x150&set=set1"
},
{
"name": "fspini2",
"score": 119396,
"icon": "https://robohash.org/numquamprovidentquis.png?size=150x150&set=set1"
},
{
"name": "bfinlan1",
"score": 88122,
"icon": "https://robohash.org/quicupiditatesed.png?size=150x150&set=set1"
},
{
"name": "grannald5",
"score": 78152,
"icon": "https://robohash.org/eumnonerror.png?size=150x150&set=set1"
},
{
"name": "blind6",
"score": 73583,
"icon": "https://robohash.org/autconsecteturet.png?size=150x150&set=set1"
},
{
"name": "gassiratti3",
"score": 32128,
"icon": "https://robohash.org/autdoloribusest.png?size=150x150&set=set1"
},
{
"name": "mvandervlies9",
"score": 16114,
"icon": "https://robohash.org/fugaodiodignissimos.png?size=150x150&set=set1"
},
{
"name": "ahutten8",
"score": 1170,
"icon": "https://robohash.org/quiquiillo.png?size=150x150&set=set1"
}
]
List all leaderboards
fetch('https://api.placeholderjson.dev/leaderboard')
.then(response => response.json())
.then(json => console.log(json))
// Return
[{"name": "sarmitage0", /* ... */ }]
Information
Data
Name | Type |
---|---|
name | string |
score | number |
icon | string |