#Leaderboards removing invalid scores

1 messages · Page 1 of 1 (latest)

errant venture
#

Hi,
what would be the easiest way to go through all leaderboards for a project and delete scores below a certain threshold (eg lap time scores below 10 seconds)?
Thanks

pure totem
wispy cloak
#

Could use Unity CLI as well

pure totem
#

Actually not sure there is a way to remove scores from a leaderboard now that i look at the API

errant venture
#

Any idea if there's a way to get the leaderboard entry metadata when requesting scores?

errant venture
#

But i'm getting the following error when trying to get the scores with the metadata included

Deserialization of type 'Unity.Services.Apis.Leaderboards.LeaderboardScoresPage' failed.
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: {. Path 'results[0].metadata', line 1, position 184.
#
var clientC = ApiService.CreateGameClient();
var responseC = await clientC.SignUpAnonymously(projectId);
var apiC = clientC.Leaderboards;

ApiResponse<Unity.Services.Apis.Leaderboards.LeaderboardScoresPage> scores = await apiC.GetLeaderboardScores(projectId, "0", true);

The code works correctly if i don't request the metadata

pure totem
#

Are you certain metadata has been set for the scores? Sounds like the metadata might be null or somehow invalid in some way