PlayerIO

The fastest way to build online games without breaking a sweat.

Multiplayer Reference

Multiplayer  class documentationClass Leaderboards

Namespace: PlayerIO.GameLibrary
Language: C# / .NET

The Player.IO Leaderboard service

Methods

 
public void
Count (string group, string leaderboard, Callback<int> successCallback)

Gets the number of entries in a leaderboard

public void
Count (string group, string leaderboard, Callback<int> successCallback, Callback<PlayerIOError> errorCallback)

Gets the number of entries in a leaderboard

public void
GetNeighbourhood (string group, string leaderboard, int index, int count, String[] filterUserIds, Callback<LeaderboardEntry[]> successCallback)

Gets the neighbourhood of entries of a leaderbord around the current user.

public void
GetNeighbourhood (string group, string leaderboard, int index, int count, String[] filterUserIds, Callback<LeaderboardEntry[]> successCallback, Callback<PlayerIOError> errorCallback)

Gets the neighbourhood of entries of a leaderbord around the current user.

public void
GetTop (string group, string leaderboard, int index, int count, String[] filterUserIds, Callback<LeaderboardEntry[]> successCallback)

Gets the top entries of a leaderbord.

public void
GetTop (string group, string leaderboard, int index, int count, String[] filterUserIds, Callback<LeaderboardEntry[]> successCallback, Callback<PlayerIOError> errorCallback)

Gets the top entries of a leaderbord.

public void
Set (string group, string leaderboard, Int64 score, Callback<LeaderboardEntry> successCallback)

Sets the score for a user on a leaderboard

public void
Set (string group, string leaderboard, Int64 score, Callback<LeaderboardEntry> successCallback, Callback<PlayerIOError> errorCallback)

Sets the score for a user on a leaderboard

Leaderboards.Count

public void
Count (string group, string leaderboard, Callback<int> successCallback)

Gets the number of entries in a leaderboard

Arguments

string group
The identifier of the leaderboard group.
string leaderboard
The identifier of the specific leaderboard in the group, or null for the default leaderboard.
Callback<int> successCallback
Callback that will be called when the operation succeeds.

Leaderboards.Count

public void
Count (string group, string leaderboard, Callback<int> successCallback, Callback<PlayerIOError> errorCallback)

Gets the number of entries in a leaderboard

Arguments

string group
The identifier of the leaderboard group.
string leaderboard
The identifier of the specific leaderboard in the group, or null for the default leaderboard.
Callback<int> successCallback
Callback that will be called when the operation succeeds.
Callback<PlayerIOError> errorCallback
Callback that will be called instead of successCallback if an error occurs during the operation.

Leaderboards.GetNeighbourhood

public void
GetNeighbourhood (string group, string leaderboard, int index, int count, String[] filterUserIds, Callback<LeaderboardEntry[]> successCallback)

Gets the neighbourhood of entries of a leaderbord around the current user.

Arguments

string group
The identifier of the leaderboard group.
string leaderboard
The identifier of the specific leaderboard in the group, or null for the default leaderboard.
int index
What index to start getting entries from. An index of 0 starts at the user. A negative index starts that many entries above the user, and a positive index starts below the user.
int count
How many leaderboard entries to get. The max number of entries that can be retrieved per call is 1000.
String[] filterUserIds
An optional list of users to filter the results by. For example, if you pass in a list of the user's friends, you could get the 10 closest friends above the user.
Callback<LeaderboardEntry[]> successCallback
Callback that will be called when the operation succeeds. Contains the loaded list of OneScores.

Leaderboards.GetNeighbourhood

public void
GetNeighbourhood (string group, string leaderboard, int index, int count, String[] filterUserIds, Callback<LeaderboardEntry[]> successCallback, Callback<PlayerIOError> errorCallback)

Gets the neighbourhood of entries of a leaderbord around the current user.

Arguments

string group
The identifier of the leaderboard group.
string leaderboard
The identifier of the specific leaderboard in the group, or null for the default leaderboard.
int index
What index to start getting entries from. An index of 0 starts at the user. A negative index starts that many entries above the user, and a positive index starts below the user.
int count
How many leaderboard entries to get. The max number of entries that can be retrieved per call is 1000.
String[] filterUserIds
An optional list of users to filter the results by. For example, if you pass in a list of the user's friends, you could get the 10 closest friends above the user.
Callback<LeaderboardEntry[]> successCallback
Callback that will be called when the operation succeeds. Contains the loaded list of OneScores.
Callback<PlayerIOError> errorCallback
Callback that will be called instead of successCallback if an error occurs during the operation.

Leaderboards.GetTop

public void
GetTop (string group, string leaderboard, int index, int count, String[] filterUserIds, Callback<LeaderboardEntry[]> successCallback)

Gets the top entries of a leaderbord.

Arguments

string group
The identifier of the leaderboard group.
string leaderboard
The identifier of the specific leaderboard in the group, or null for the default leaderboard.
int index
What index to start getting entries from. An index of 0 starts at the user with rank #1, an index of 100 starts at the user with rank #101, etc.
int count
How many leaderboard entries to get. The max number of entries that can be retrieved per call is 1000.
String[] filterUserIds
An optional list of users to filter the results by. For example, if you pass in a list of the user's friends, you could get the 10 best friends, and their absolute rank.
Callback<LeaderboardEntry[]> successCallback
Callback that will be called when the operation succeeds. Contains the loaded list of OneScores.

Leaderboards.GetTop

public void
GetTop (string group, string leaderboard, int index, int count, String[] filterUserIds, Callback<LeaderboardEntry[]> successCallback, Callback<PlayerIOError> errorCallback)

Gets the top entries of a leaderbord.

Arguments

string group
The identifier of the leaderboard group.
string leaderboard
The identifier of the specific leaderboard in the group, or null for the default leaderboard.
int index
What index to start getting entries from. An index of 0 starts at the user with rank #1, an index of 100 starts at the user with rank #101, etc.
int count
How many leaderboard entries to get. The max number of entries that can be retrieved per call is 1000.
String[] filterUserIds
An optional list of users to filter the results by. For example, if you pass in a list of the user's friends, you could get the 10 best friends, and their absolute rank.
Callback<LeaderboardEntry[]> successCallback
Callback that will be called when the operation succeeds. Contains the loaded list of OneScores.
Callback<PlayerIOError> errorCallback
Callback that will be called instead of successCallback if an error occurs during the operation.

Leaderboards.Set

public void
Set (string group, string leaderboard, Int64 score, Callback<LeaderboardEntry> successCallback)

Sets the score for a user on a leaderboard

Arguments

string group
The identifier of the leaderboard group.
string leaderboard
The identifier of the specific leaderboard in the group, or null for the default leaderboard.
Int64 score
The score to set for the user.
Callback<LeaderboardEntry> successCallback
Callback that will be called when the operation succeeds.

Leaderboards.Set

public void
Set (string group, string leaderboard, Int64 score, Callback<LeaderboardEntry> successCallback, Callback<PlayerIOError> errorCallback)

Sets the score for a user on a leaderboard

Arguments

string group
The identifier of the leaderboard group.
string leaderboard
The identifier of the specific leaderboard in the group, or null for the default leaderboard.
Int64 score
The score to set for the user.
Callback<LeaderboardEntry> successCallback
Callback that will be called when the operation succeeds.
Callback<PlayerIOError> errorCallback
Callback that will be called instead of successCallback if an error occurs during the operation.