Interface ILeaderboardsApi
Represents a collection of functions to interact with the API endpoints
Namespace: Unity.Services.Apis.Leaderboards
Assembly: Unity.Services.Apis.dll
Syntax
public interface ILeaderboardsApi : IApiAccessor
Methods
AddLeaderboardPlayerScore(string, string, string, AddLeaderboardScore, CancellationToken)
Add Player Score
Declaration
ApiOperation<LeaderboardEntryWithUpdatedTime> AddLeaderboardPlayerScore(string projectId, string leaderboardId, string playerId, AddLeaderboardScore addLeaderboardScore = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | The project's Project ID |
string | leaderboardId | ID of the leaderboard |
string | playerId | ID of the player |
Add |
addLeaderboardScore | (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetLeaderboardPlayerScore(string, string, string, bool?, CancellationToken)
Get Player Score
Declaration
ApiOperation<LeaderboardEntryWithUpdatedTime> GetLeaderboardPlayerScore(string projectId, string leaderboardId, string playerId, bool? includeMetadata = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | The project's Project ID |
string | leaderboardId | ID of the leaderboard |
string | playerId | ID of the player |
bool? | includeMetadata | True/false to determine whether to include metadata. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetLeaderboardScores(string, string, bool?, int?, int?, CancellationToken)
Get Scores
Declaration
ApiOperation<LeaderboardScoresPage> GetLeaderboardScores(string projectId, string leaderboardId, bool? includeMetadata = null, int? offset = null, int? limit = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | The project's Project ID |
string | leaderboardId | ID of the leaderboard |
bool? | includeMetadata | True/false to determine whether to include metadata. (optional) |
int? | offset | The number of entries to skip when retrieving the leaderboard scores. Defaults to 0 (optional) |
int? | limit | The number of leaderboard scores to return. Defaults to 10 (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetLeaderboardScoresByPlayerIds(string, string, bool?, LeaderboardPlayerIds, CancellationToken)
Get Scores By PlayerIds
Declaration
ApiOperation<LeaderboardScoresWithNotFoundPlayerIds> GetLeaderboardScoresByPlayerIds(string projectId, string leaderboardId, bool? includeMetadata = null, LeaderboardPlayerIds leaderboardPlayerIds = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | The project's Project ID |
string | leaderboardId | ID of the leaderboard |
bool? | includeMetadata | True/false to determine whether to include metadata. (optional) |
Leaderboard |
leaderboardPlayerIds | (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetLeaderboardScoresByPlayerIdsArchiveVersion(string, string, string, bool?, LeaderboardPlayerIds, CancellationToken)
Get Scores By PlayerIds for Archived Leaderboard
Declaration
ApiOperation<LeaderboardVersionScoresByPlayerIds> GetLeaderboardScoresByPlayerIdsArchiveVersion(string projectId, string leaderboardId, string versionId, bool? includeMetadata = null, LeaderboardPlayerIds leaderboardPlayerIds = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | The project's Project ID |
string | leaderboardId | ID of the leaderboard |
string | versionId | ID of the leaderboard version |
bool? | includeMetadata | True/false to determine whether to include metadata. (optional) |
Leaderboard |
leaderboardPlayerIds | (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetLeaderboardScoresByTier(string, string, string, bool?, int?, int?, CancellationToken)
Get Scores By Tier
Declaration
ApiOperation<LeaderboardTierScoresPage> GetLeaderboardScoresByTier(string projectId, string leaderboardId, string tierId, bool? includeMetadata = null, int? offset = null, int? limit = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | The project's Project ID |
string | leaderboardId | ID of the leaderboard |
string | tierId | ID of the leaderboard tier. |
bool? | includeMetadata | True/false to determine whether to include metadata. (optional) |
int? | offset | The number of entries to skip when retrieving the leaderboard scores. Defaults to 0 (optional) |
int? | limit | The number of leaderboard scores to return. Defaults to 10 (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetLeaderboardScoresPlayerRange(string, string, string, bool?, int?, CancellationToken)
Get Player Range
Declaration
ApiOperation<LeaderboardScores> GetLeaderboardScoresPlayerRange(string projectId, string leaderboardId, string playerId, bool? includeMetadata = null, int? rangeLimit = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | The project's Project ID |
string | leaderboardId | ID of the leaderboard |
string | playerId | ID of the player |
bool? | includeMetadata | True/false to determine whether to include metadata. (optional) |
int? | rangeLimit | The number of entries either side of the player to retrieve. Defaults to 5. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetLeaderboardVersionPlayerScore(string, string, string, string, bool?, CancellationToken)
Get Archived Version Player Score
Declaration
ApiOperation<LeaderboardVersionEntry> GetLeaderboardVersionPlayerScore(string projectId, string leaderboardId, string versionId, string playerId, bool? includeMetadata = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | The project's Project ID |
string | leaderboardId | ID of the leaderboard |
string | versionId | ID of the leaderboard version |
string | playerId | ID of the player |
bool? | includeMetadata | True/false to determine whether to include metadata. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetLeaderboardVersionScores(string, string, string, bool?, int?, int?, CancellationToken)
Get Archived Version Scores
Declaration
ApiOperation<LeaderboardVersionScoresPage> GetLeaderboardVersionScores(string projectId, string leaderboardId, string versionId, bool? includeMetadata = null, int? offset = null, int? limit = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | The project's Project ID |
string | leaderboardId | ID of the leaderboard |
string | versionId | ID of the leaderboard version |
bool? | includeMetadata | True/false to determine whether to include metadata. (optional) |
int? | offset | The number of entries to skip when retrieving the leaderboard scores. Defaults to 0 (optional) |
int? | limit | The number of leaderboard scores to return. Defaults to 10 (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetLeaderboardVersionScoresByTier(string, string, string, string, bool?, int?, int?, CancellationToken)
Get Archived Version Scores By Tier
Declaration
ApiOperation<LeaderboardVersionTierScoresPage> GetLeaderboardVersionScoresByTier(string projectId, string leaderboardId, string versionId, string tierId, bool? includeMetadata = null, int? offset = null, int? limit = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | The project's Project ID |
string | leaderboardId | ID of the leaderboard |
string | versionId | ID of the leaderboard version |
string | tierId | ID of the leaderboard tier. |
bool? | includeMetadata | True/false to determine whether to include metadata. (optional) |
int? | offset | The number of entries to skip when retrieving the leaderboard scores. Defaults to 0 (optional) |
int? | limit | The number of leaderboard scores to return. Defaults to 10 (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetLeaderboardVersionScoresPlayerRange(string, string, string, string, bool?, int?, CancellationToken)
Get Player Range for Archived Leaderboard
Declaration
ApiOperation<LeaderboardVersionRange> GetLeaderboardVersionScoresPlayerRange(string projectId, string leaderboardId, string versionId, string playerId, bool? includeMetadata = null, int? rangeLimit = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | The project's Project ID |
string | leaderboardId | ID of the leaderboard |
string | versionId | ID of the leaderboard version |
string | playerId | ID of the player |
bool? | includeMetadata | True/false to determine whether to include metadata. (optional) |
int? | rangeLimit | The number of entries either side of the player to retrieve. Defaults to 5. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetLeaderboardVersions(string, string, int?, CancellationToken)
Get Archived Versions
Declaration
ApiOperation<LeaderboardVersions> GetLeaderboardVersions(string projectId, string leaderboardId, int? limit = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | The project's Project ID |
string | leaderboardId | ID of the leaderboard |
int? | limit | The number of leaderboard versions to return. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |