Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class GetEntriesOptions
{
public int page = 0;
public int aliasId = -1;
public string playerId = "";
public bool includeArchived = false;
public string propKey = "";
public string propValue = "";
Expand All @@ -20,6 +21,7 @@ public string ToQueryString()
{
var query = new Dictionary<string, string> { ["page"] = page.ToString() };
if (aliasId != -1) query["aliasId"] = aliasId.ToString();
if (!string.IsNullOrEmpty(playerId)) query["playerId"] = playerId;
if (includeArchived) query["withDeleted"] = "1";
if (!string.IsNullOrEmpty(propKey)) query["propKey"] = propKey;
if (!string.IsNullOrEmpty(propValue)) query["propValue"] = propValue;
Expand All @@ -32,7 +34,7 @@ public string ToQueryString()

public class LeaderboardsAPI : BaseAPI
{
private LeaderboardEntriesManager _entriesManager = new();
private readonly LeaderboardEntriesManager _entriesManager = new();

public LeaderboardsAPI() : base("v1/leaderboards") { }

Expand Down Expand Up @@ -65,6 +67,7 @@ public async Task<LeaderboardEntriesResponse> GetEntries(string internalName, Ge
return res;
}

[Obsolete("Use GetEntries(string internalName, GetEntriesOptions options) with the aliasId or playerId option instead.")]
public async Task<LeaderboardEntriesResponse> GetEntriesForCurrentPlayer(string internalName, GetEntriesOptions options = null)
{
Talo.IdentityCheck();
Expand All @@ -86,7 +89,7 @@ public async Task<LeaderboardEntriesResponse> GetEntries(string internalName, in
});
}

[Obsolete("Use GetEntriesForCurrentPlayer(string internalName, GetEntriesOptions options) instead.")]
[Obsolete("Use GetEntries(string internalName, GetEntriesOptions options) with the aliasId or playerId option instead.")]
public async Task<LeaderboardEntriesResponse> GetEntriesForCurrentPlayer(string internalName, int page, bool includeArchived = false)
{
Talo.IdentityCheck();
Expand Down