ListLeaderboardRecordsAsync has a ownerIds parameter which allows me to filter the scores by a list of UserIds - ie, a list of Friends. However, ListLeaderboardRecordsAroundOwnerAsync doesn’t appear to be able to do this. Is that something I need to request to be added in a future release or am I missing something ? I’m using the Unity client.
ListLeaderboardRecordsAroundOwnerAsync is useful to display the current position of the player in the leaderboard and being able to traverse it in either direction from that position, if you’d like to get the records for a list of friends you’d use
ListLeaderboardRecordsAsync as you’d mention, is there another use case that is not covered by these APIs?
Well, I usually display the top 25 scores in a leaderboard using
ListLeaderboardRecordsAsync and if you’re not in the top 25 then I use
ListLeaderboardRecordsAroundOwnerAsync to display the scores around the player underneath the top 25 list. However, if I want to only display a player’s friends in the leaderboards then
ListLeaderboardRecordsAroundOwnerAsync can’t filter by friends so this won’t work. Having thought about it a bit more, then it probably isn’t a problem as it’s unlikely that many users will have a list of friends so large that I have to split the leaderboard like this. Instead I will just use
ListLeaderboardRecordsAsync to show the top 100 scores if I’m filtering by friends and if you have more than 100 friends and your score sucks then you just won’t be shown in the leaderboard.