docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LeaderboardsAdminApi

    Represents a collection of functions to interact with the API endpoints

    Inheritance
    object
    LeaderboardsAdminApi
    Implements
    ILeaderboardsAdminApi
    IApiAccessor
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Services.Apis.Admin.Leaderboards
    Assembly: Unity.Services.Apis.dll
    Syntax
    public class LeaderboardsAdminApi : ILeaderboardsAdminApi, IApiAccessor

    Constructors

    LeaderboardsAdminApi(IApiClient)

    Initializes a new instance of the LeaderboardsAdminApi class using a Configuration object and client instance.

    Declaration
    public LeaderboardsAdminApi(IApiClient apiClient)
    Parameters
    Type Name Description
    IApiClient apiClient

    The client interface for synchronous API access.

    LeaderboardsAdminApi(IApiClient, IApiConfiguration)

    Initializes a new instance of the LeaderboardsAdminApi class using a Configuration object and client instance.

    Declaration
    public LeaderboardsAdminApi(IApiClient apiClient, IApiConfiguration apiConfiguration)
    Parameters
    Type Name Description
    IApiClient apiClient

    The client interface for synchronous API access.

    IApiConfiguration apiConfiguration

    The configuration object.

    Properties

    Client

    The client for accessing this underlying API asynchronously.

    Declaration
    public IApiClient Client { get; }
    Property Value
    Type Description
    IApiClient

    Configuration

    Gets the configuration object

    Declaration
    public IApiConfiguration Configuration { get; }
    Property Value
    Type Description
    IApiConfiguration

    An instance of the Configuration

    Methods

    CreateLeaderboard(string, string, LeaderboardIdConfig, CancellationToken)

    Create Leaderboard Add leaderboard to project environment

    Declaration
    public ApiOperation CreateLeaderboard(string projectId, string environmentId, LeaderboardIdConfig leaderboardIdConfig = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    LeaderboardIdConfig leaderboardIdConfig

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    DeleteLeaderboard(string, string, string, CancellationToken)

    Delete Leaderboard Deletes the configuration and scores for a specific leaderboard

    Declaration
    public ApiOperation DeleteLeaderboard(string projectId, string environmentId, string leaderboardId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string leaderboardId

    ID of the leaderboard, as set by the user. IDs can be listed by retrieving the leaderboard configurations.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    DeleteLeaderboardPlayerScore(string, string, string, string, CancellationToken)

    Delete Player Score Deletes the score for a specific player from a specific leaderboard

    Declaration
    public ApiOperation DeleteLeaderboardPlayerScore(string projectId, string environmentId, string leaderboardId, string playerId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string leaderboardId

    ID of the leaderboard, as set by the user. IDs can be listed by retrieving the leaderboard configurations.

    string playerId

    ID of the player

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    DeleteLeaderboardPlayerScoreAllLiveLeaderboards(string, string, string, CancellationToken)

    Delete Player Score From All Live Leaderboards Deletes the score for a specific player from all live leaderboards

    Declaration
    public ApiOperation DeleteLeaderboardPlayerScoreAllLiveLeaderboards(string projectId, string environmentId, string playerId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string playerId

    ID of the player

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    GetBasePath()

    Gets the base path of the API client.

    Declaration
    public string GetBasePath()
    Returns
    Type Description
    string

    The base path

    GetLeaderboardBucketScores(string, string, string, string, int?, int?, CancellationToken)

    Get Bucket Scores Get list of scores and ranks for the specified bucket from the specified leaderboard, with specified pagination.

    Declaration
    public ApiOperation<LeaderboardScoresPage> GetLeaderboardBucketScores(string projectId, string environmentId, string leaderboardId, string bucketId, int? offset = null, int? limit = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string leaderboardId

    ID of the leaderboard, as set by the user. IDs can be listed by retrieving the leaderboard configurations.

    string bucketId

    ID of the leaderboard bucket

    int? offset

    The number of entries to skip when retrieving the leaderboard bucket scores. Defaults to 0 (optional)

    int? limit

    The number of leaderboard bucket scores to return. Defaults to 10 (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardScoresPage>

    The operation

    GetLeaderboardBucketScoresByTier(string, string, string, string, string, int?, int?, CancellationToken)

    Get Bucket Scores By Tier Get list of scores and ranks for the specified bucket from the specified leaderboard, within the specified tier, with specified pagination.

    Declaration
    public ApiOperation<LeaderboardTierScoresPage> GetLeaderboardBucketScoresByTier(string projectId, string environmentId, string leaderboardId, string bucketId, string tierId, int? offset = null, int? limit = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string leaderboardId

    ID of the leaderboard, as set by the user. IDs can be listed by retrieving the leaderboard configurations.

    string bucketId

    ID of the leaderboard bucket

    string tierId

    ID of the leaderboard tier.

    int? offset

    The number of entries to skip when retrieving the leaderboard bucket scores. Defaults to 0 (optional)

    int? limit

    The number of leaderboard bucket scores to return. Defaults to 10 (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardTierScoresPage>

    The operation

    GetLeaderboardBuckets(string, string, string, int?, int?, CancellationToken)

    Get Bucket IDs Retrieves the bucket IDs for a specific bucketed leaderboard

    Declaration
    public ApiOperation<BucketsPage> GetLeaderboardBuckets(string projectId, string environmentId, string leaderboardId, int? offset = null, int? limit = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string leaderboardId

    ID of the leaderboard, as set by the user. IDs can be listed by retrieving the leaderboard configurations.

    int? offset

    The number of buckets to skip when retrieving the leaderboard bucket IDs. Defaults to 0 (optional)

    int? limit

    The maximum number of leaderboard bucket IDs to return. Defaults to 10 (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<BucketsPage>

    The operation

    GetLeaderboardConfig(string, string, string, CancellationToken)

    Get Leaderboard Config Retrieves the configuration for a specific leaderboard

    Declaration
    public ApiOperation<UpdatedLeaderboardConfig> GetLeaderboardConfig(string projectId, string environmentId, string leaderboardId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string leaderboardId

    ID of the leaderboard, as set by the user. IDs can be listed by retrieving the leaderboard configurations.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<UpdatedLeaderboardConfig>

    The operation

    GetLeaderboardConfigs(string, string, string, int?, CancellationToken)

    Get Leaderboard Configs List leaderboard configurations for the given project environment

    Declaration
    public ApiOperation<LeaderboardConfigPage> GetLeaderboardConfigs(string projectId, string environmentId, string cursor = null, int? limit = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string cursor

    The ID of the leaderboard that listing should start after, i.e. the last leaderboard returned from the previous page when paging (optional)

    int? limit

    The number of leaderboards to return. Defaults to 10 (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardConfigPage>

    The operation

    GetLeaderboardPlayerScore(string, string, string, string, CancellationToken)

    Get Player Score Get score and rank for the specified player in the specified leaderboard.

    Declaration
    public ApiOperation<LeaderboardEntryWithUpdatedTime> GetLeaderboardPlayerScore(string projectId, string environmentId, string leaderboardId, string playerId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string leaderboardId

    ID of the leaderboard, as set by the user. IDs can be listed by retrieving the leaderboard configurations.

    string playerId

    ID of the player

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardEntryWithUpdatedTime>

    The operation

    GetLeaderboardScores(string, string, string, int?, int?, CancellationToken)

    Get Scores Get list of scores and ranks for the specified leaderboard, with specified pagination.

    Declaration
    public ApiOperation<LeaderboardScoresPage> GetLeaderboardScores(string projectId, string environmentId, string leaderboardId, int? offset = null, int? limit = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string leaderboardId

    ID of the leaderboard, as set by the user. IDs can be listed by retrieving the leaderboard configurations.

    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)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardScoresPage>

    The operation

    GetLeaderboardScoresByTier(string, string, string, string, int?, int?, CancellationToken)

    Get Scores By Tier Get list of scores and ranks for the specified leaderboard, within the specified tier, with specified pagination.

    Declaration
    public ApiOperation<LeaderboardTierScoresPage> GetLeaderboardScoresByTier(string projectId, string environmentId, string leaderboardId, string tierId, int? offset = null, int? limit = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string leaderboardId

    ID of the leaderboard, as set by the user. IDs can be listed by retrieving the leaderboard configurations.

    string tierId

    ID of the leaderboard tier.

    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)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardTierScoresPage>

    The operation

    GetLeaderboardVersionBucketScores(string, string, string, string, string, int?, int?, CancellationToken)

    Get Version Bucket Scores Get list of scores and ranks for the specified bucket from the specified leaderboard version, with specified pagination.

    Declaration
    public ApiOperation<LeaderboardVersionScoresPage> GetLeaderboardVersionBucketScores(string projectId, string environmentId, string leaderboardId, string versionId, string bucketId, int? offset = null, int? limit = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string leaderboardId

    ID of the leaderboard, as set by the user. IDs can be listed by retrieving the leaderboard configurations.

    string versionId

    ID of the leaderboard version

    string bucketId

    ID of the leaderboard bucket

    int? offset

    The number of entries to skip when retrieving the leaderboard version bucket scores. Defaults to 0 (optional)

    int? limit

    The number of leaderboard version bucket scores to return. Defaults to 10 (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardVersionScoresPage>

    The operation

    GetLeaderboardVersionBucketScoresByTier(string, string, string, string, string, string, int?, int?, CancellationToken)

    Get Version Bucket Scores By Tier Get list of scores and ranks for the specified bucket from the specified leaderboard version, within the specified tier, with specified pagination.

    Declaration
    public ApiOperation<LeaderboardVersionTierScoresPage> GetLeaderboardVersionBucketScoresByTier(string projectId, string environmentId, string leaderboardId, string versionId, string bucketId, string tierId, int? offset = null, int? limit = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string leaderboardId

    ID of the leaderboard, as set by the user. IDs can be listed by retrieving the leaderboard configurations.

    string versionId

    ID of the leaderboard version

    string bucketId

    ID of the leaderboard bucket

    string tierId

    ID of the leaderboard tier.

    int? offset

    The number of entries to skip when retrieving the leaderboard version bucket scores. Defaults to 0 (optional)

    int? limit

    The number of leaderboard version bucket scores to return. Defaults to 10 (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardVersionTierScoresPage>

    The operation

    GetLeaderboardVersionBuckets(string, string, string, string, int?, int?, CancellationToken)

    Get Version Bucket IDs Get the bucket IDs for a specific bucketed leaderboard archive version, with specified pagination.

    Declaration
    public ApiOperation<VersionBucketsPage> GetLeaderboardVersionBuckets(string projectId, string environmentId, string leaderboardId, string versionId, int? offset = null, int? limit = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string leaderboardId

    ID of the leaderboard, as set by the user. IDs can be listed by retrieving the leaderboard configurations.

    string versionId

    ID of the leaderboard version

    int? offset

    The number of entries to skip when retrieving the leaderboard version bucket IDs. Defaults to 0 (optional)

    int? limit

    The number of leaderboard version bucket IDs to return. Defaults to 10 (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<VersionBucketsPage>

    The operation

    GetLeaderboardVersionPlayerScore(string, string, string, string, string, CancellationToken)

    Get Version Player Score Get score and rank for the specified player in the specified archived leaderboard version.

    Declaration
    public ApiOperation<LeaderboardVersionEntry> GetLeaderboardVersionPlayerScore(string projectId, string environmentId, string leaderboardId, string versionId, string playerId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string leaderboardId

    ID of the leaderboard, as set by the user. IDs can be listed by retrieving the leaderboard configurations.

    string versionId

    ID of the leaderboard version

    string playerId

    ID of the player

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardVersionEntry>

    The operation

    GetLeaderboardVersionScores(string, string, string, string, int?, int?, CancellationToken)

    Get Version Scores Get list of scores and ranks for the specified archived leaderboard version, with specified pagination.

    Declaration
    public ApiOperation<LeaderboardVersionScoresPage> GetLeaderboardVersionScores(string projectId, string environmentId, string leaderboardId, string versionId, int? offset = null, int? limit = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string leaderboardId

    ID of the leaderboard, as set by the user. IDs can be listed by retrieving the leaderboard configurations.

    string versionId

    ID of the leaderboard version

    int? offset

    The number of entries to skip when retrieving the leaderboard version scores. Defaults to 0 (optional)

    int? limit

    The number of leaderboard version scores to return. Defaults to 10 (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardVersionScoresPage>

    The operation

    GetLeaderboardVersionScoresByTier(string, string, string, string, string, int?, int?, CancellationToken)

    Get Version Scores By Tier Get list of scores and ranks for the specified archived leaderboard version, within the specified tier, with specified pagination.

    Declaration
    public ApiOperation<LeaderboardVersionTierScoresPage> GetLeaderboardVersionScoresByTier(string projectId, string environmentId, string leaderboardId, string versionId, string tierId, int? offset = null, int? limit = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string leaderboardId

    ID of the leaderboard, as set by the user. IDs can be listed by retrieving the leaderboard configurations.

    string versionId

    ID of the leaderboard version

    string tierId

    ID of the leaderboard tier.

    int? offset

    The number of entries to skip when retrieving the leaderboard version scores. Defaults to 0 (optional)

    int? limit

    The number of leaderboard version scores to return. Defaults to 10 (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardVersionTierScoresPage>

    The operation

    ResetLeaderboardScores(string, string, string, bool?, CancellationToken)

    Reset Scores Reset the scores for the specified leaderboard, optionally archiving the existing scores before resetting. When archiving, the operation will return the version ID of the archive version that has been created. Each leaderboard can have up to 10,000 archives. Beyond this limit, the system will automatically delete the oldest archives on a first-in, first-out (FIFO) basis.

    Declaration
    public ApiOperation<LeaderboardVersionId> ResetLeaderboardScores(string projectId, string environmentId, string leaderboardId, bool? archive = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string leaderboardId

    ID of the leaderboard, as set by the user. IDs can be listed by retrieving the leaderboard configurations.

    bool? archive

    Whether or not to archive the current set of scores before resetting the leaderboard (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardVersionId>

    The operation

    UpdateLeaderboardConfig(string, string, string, LeaderboardPatchConfig, CancellationToken)

    Update Leaderboard Config Updates the configuration for a specific leaderboard

    Declaration
    public ApiOperation UpdateLeaderboardConfig(string projectId, string environmentId, string leaderboardId, LeaderboardPatchConfig leaderboardPatchConfig = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string projectId

    The project's Project ID

    string environmentId

    The Environment ID of a project

    string leaderboardId

    ID of the leaderboard, as set by the user. IDs can be listed by retrieving the leaderboard configurations.

    LeaderboardPatchConfig leaderboardPatchConfig

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    Implements

    ILeaderboardsAdminApi
    IApiAccessor
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)