Skip to content

Commit 109c8f5

Browse files
authored
Merge pull request #63 from TaloDev/unify-leaderboard-entries
Unify responses from GetEntries and GetEntriesForCurrentPlayer
2 parents 11a77ab + bb0c447 commit 109c8f5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Packages/com.trytalo.talo/Runtime/LeaderboardsAPI.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,15 @@ public async Task<LeaderboardEntriesResponse> GetEntries(string internalName, in
1717
return res;
1818
}
1919

20-
public async Task<LeaderboardEntry[]> GetEntriesForCurrentPlayer(string leaderboardInternalName, int page)
20+
public async Task<LeaderboardEntriesResponse> GetEntriesForCurrentPlayer(string internalName, int page)
2121
{
2222
Talo.IdentityCheck();
2323

24-
var uri = new Uri(baseUrl + $"/{leaderboardInternalName}/entries?page={page}&aliasId={Talo.CurrentAlias.id}");
24+
var uri = new Uri(baseUrl + $"/{internalName}/entries?page={page}&aliasId={Talo.CurrentAlias.id}");
2525

2626
var json = await Call(uri, "GET");
2727
var res = JsonUtility.FromJson<LeaderboardEntriesResponse>(json);
28-
29-
return res.entries;
28+
return res;
3029
}
3130

3231
public async Task<(LeaderboardEntry, bool)> AddEntry(string internalName, float score)

0 commit comments

Comments
 (0)