docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LeaderboardsApi

    Represents a collection of functions to interact with the API endpoints

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

    Constructors

    LeaderboardsApi(IApiClient)

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

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

    The client interface for synchronous API access.

    LeaderboardsApi(IApiClient, IApiConfiguration)

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

    Declaration
    public LeaderboardsApi(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

    AddLeaderboardPlayerScore(string, string, string, AddLeaderboardScore, CancellationToken)

    Add Player Score Add score for the specified player to the specified leaderboard.

    Declaration
    public 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

    AddLeaderboardScore addLeaderboardScore

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardEntryWithUpdatedTime>

    The operation

    GetBasePath()

    Gets the base path of the API client.

    Declaration
    public string GetBasePath()
    Returns
    Type Description
    string

    The base path

    GetLeaderboardPlayerScore(string, string, string, bool?, CancellationToken)

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

    Declaration
    public 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)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardEntryWithUpdatedTime>

    The operation

    GetLeaderboardScores(string, string, bool?, 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 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)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardScoresPage>

    The operation

    GetLeaderboardScoresByPlayerIds(string, string, bool?, LeaderboardPlayerIds, CancellationToken)

    Get Scores By PlayerIds Get list of scores and ranks for the specified leaderboard, with specified playerIds.

    Declaration
    public 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)

    LeaderboardPlayerIds leaderboardPlayerIds

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardScoresWithNotFoundPlayerIds>

    The operation

    GetLeaderboardScoresByPlayerIdsArchiveVersion(string, string, string, bool?, LeaderboardPlayerIds, CancellationToken)

    Get Scores By PlayerIds for Archived Leaderboard Get list of scores and ranks for an archived leaderboard, with specified playerIds.

    Declaration
    public 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)

    LeaderboardPlayerIds leaderboardPlayerIds

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardVersionScoresByPlayerIds>

    The operation

    GetLeaderboardScoresByTier(string, string, string, bool?, 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 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)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardTierScoresPage>

    The operation

    GetLeaderboardScoresPlayerRange(string, string, string, bool?, int?, CancellationToken)

    Get Player Range Get the list of neighbouring players for the specified player Id.

    Declaration
    public 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)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardScores>

    The operation

    GetLeaderboardVersionPlayerScore(string, string, string, string, bool?, CancellationToken)

    Get Archived 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 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)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardVersionEntry>

    The operation

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

    Get Archived 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 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)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardVersionScoresPage>

    The operation

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

    Get Archived 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 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)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardVersionTierScoresPage>

    The operation

    GetLeaderboardVersionScoresPlayerRange(string, string, string, string, bool?, int?, CancellationToken)

    Get Player Range for Archived Leaderboard Get the list of neighbouring players for the specified player Id for an archived Leaderboard.

    Declaration
    public 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)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardVersionRange>

    The operation

    GetLeaderboardVersions(string, string, int?, CancellationToken)

    Get Archived Versions Get list of archived leaderboard versions for the specified leaderboard, with specified pagination.

    Declaration
    public 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)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<LeaderboardVersions>

    The operation

    Implements

    ILeaderboardsApi
    IApiAccessor
    In This Article
    Back to top
    Copyright © 2024 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)