Leaderboard Plugin Functions
Get Available Leaderboards
Retrieves a list of leaderboards based on the provided parameters.
- Unity3D
- TypeScript
var leaderboards = await DynamicPixels.Table.GetServices().Leaderboard.GetLeaderboards(new GetLeaderboardsParams
{
label = null,
skip = 0,
limit = 0
});
DynamicPixels.Services.Leaderboards.GetLeaderboards(): Promise<Leaderboard[]>
Get Users Scores
Obtains scores for individual users as specified by the input parameters.
- Unity3D
- TypeScript
var scores = await DynamicPixels.Table.GetServices().Leaderboard.GetUsersScores<GetScoresParams, UserScore>(new GetScoresParams
{
Leaderboardid = 0,
skip = 0,
limit = 0,
returnUserScore = false,
Conditions = new Eq("field", "value").ToQuery()
});
DynamicPixels.Services.Leaderboards.GetUsersScores(input: GetScoresParams): Promise<UserScore[]>
Get Parties Scores
Fetches scores for different parties (e.g., teams or groups) according to the given parameters.
- Unity3D
- TypeScript
var scores = await DynamicPixels.Table.GetServices().Leaderboard.GetPartiesScores<GetScoresParams, PartyScore>(new GetScoresParams
{
Leaderboardid = 0,
skip = 0,
limit = 0,
returnUserScore = false,
Conditions = new Eq("field", "value").ToQuery()
});
DynamicPixels.Services.Leaderboards.GetPartiesScores(input: GetScoresParams): Promise<PartyScore[]>
Get Friends Scores
Gathers scores specifically for friends of the current user.
- Unity3D
- TypeScript
var scores = await DynamicPixels.Table.GetServices().Leaderboard.GetFriendsScores(new GetFriendsScoresParams
{
LeaderboardId = 0,
Skip = 0,
Limit = 0
});
DynamicPixels.Services.Leaderboards.GetFriendsScores(input: GetMyFriendsScoresParams): Promise<UserScore[]>
Get My Score
Retrieves the score of the current user based on the input parameters.
- Unity3D
- TypeScript
var score = await DynamicPixels.Table.GetServices().Leaderboard.GetMyScore<GetCurrentUserScoreParams, UserScore>(new GetCurrentUserScoreParams
{
LeaderboardId = 0,
Conditions = new Eq("field", "value").ToQuery()
});
DynamicPixels.Services.Leaderboards.GetMyScore(input: GetMyScoreParams): Promise<UserScore>
Submit New Score
Submits a user's score and returns the result.
- Unity3D
- TypeScript
var score = await DynamicPixels.Table.GetServices().Leaderboard.SubmitScore<SubmitScoreParams, UserScore>(
new SubmitScoreParams
{
LeaderboardId = 0,
Score = 0,
OtherData = new Dictionary<string, dynamic>(),
PartyId = 0,
UniqueBy = "extended_field"
});
DynamicPixels.Services.Leaderboards.SubmitScore(input: SubmitScoreParams): Promise<Score>