docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface ILobbyApi

    Represents a collection of functions to interact with the API endpoints

    Inherited Members
    IApiAccessor.Configuration
    IApiAccessor.GetBasePath()
    Namespace: Unity.Services.Apis.Lobbies
    Assembly: solution.dll
    Syntax
    public interface ILobbyApi : IApiAccessor

    Methods

    BulkUpdateLobby(string, string, string, BulkUpdateRequest, CancellationToken)

    Bulk update

    Declaration
    ApiOperation<Lobby> BulkUpdateLobby(string lobbyId, string serviceId = null, string impersonatedUserId = null, BulkUpdateRequest bulkUpdateRequest = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string lobbyId

    The ID of the lobby to execute the request against. It should be composed of 64 characters or less, and only have dashes, underscores and alphanumeric characters.

    string serviceId

    When service authentication is used, this provides a logical identity for the service (optional)

    string impersonatedUserId

    When service authentication is used, this provides a 'playerId' to execute as. If this header is detected, the service request will be identical to a request from the specified player. (optional)

    BulkUpdateRequest bulkUpdateRequest

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<Lobby>

    The operation

    CreateLobby(string, string, CreateRequest, CancellationToken)

    Create a lobby

    Declaration
    ApiOperation<Lobby> CreateLobby(string serviceId = null, string impersonatedUserId = null, CreateRequest createRequest = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string serviceId

    When service authentication is used, this provides a logical identity for the service (optional)

    string impersonatedUserId

    When service authentication is used, this provides a 'playerId' to execute as. If this header is detected, the service request will be identical to a request from the specified player. (optional)

    CreateRequest createRequest

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<Lobby>

    The operation

    CreateOrJoinLobby(string, string, string, CreateRequest, CancellationToken)

    Create or join a lobby with lobby ID

    Declaration
    ApiOperation<Lobby> CreateOrJoinLobby(string lobbyId, string serviceId = null, string impersonatedUserId = null, CreateRequest createRequest = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string lobbyId

    The ID of the lobby to execute the request against. It should be composed of 64 characters or less, and only have dashes, underscores and alphanumeric characters.

    string serviceId

    When service authentication is used, this provides a logical identity for the service (optional)

    string impersonatedUserId

    When service authentication is used, this provides a 'playerId' to execute as. If this header is detected, the service request will be identical to a request from the specified player. (optional)

    CreateRequest createRequest

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<Lobby>

    The operation

    DeleteLobby(string, string, string, CancellationToken)

    Delete a lobby

    Declaration
    ApiOperation DeleteLobby(string lobbyId, string serviceId = null, string impersonatedUserId = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string lobbyId

    The ID of the lobby to execute the request against. It should be composed of 64 characters or less, and only have dashes, underscores and alphanumeric characters.

    string serviceId

    When service authentication is used, this provides a logical identity for the service (optional)

    string impersonatedUserId

    When service authentication is used, this provides a 'playerId' to execute as. If this header is detected, the service request will be identical to a request from the specified player. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    GetHostedLobbies(string, string, CancellationToken)

    Get a player/service's hosted lobbies

    Declaration
    ApiOperation<List<string>> GetHostedLobbies(string serviceId = null, string impersonatedUserId = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string serviceId

    When service authentication is used, this provides a logical identity for the service (optional)

    string impersonatedUserId

    When service authentication is used, this provides a 'playerId' to execute as. If this header is detected, the service request will be identical to a request from the specified player. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<List<string>>

    The operation

    GetJoinedLobbies(string, string, CancellationToken)

    Get a player's joined lobbies

    Declaration
    ApiOperation<List<string>> GetJoinedLobbies(string serviceId = null, string impersonatedUserId = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string serviceId

    When service authentication is used, this provides a logical identity for the service (optional)

    string impersonatedUserId

    When service authentication is used, this provides a 'playerId' to execute as. If this header is detected, the service request will be identical to a request from the specified player. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<List<string>>

    The operation

    GetLobby(string, string, string, string, CancellationToken)

    Get lobby details

    Declaration
    ApiOperation<Lobby> GetLobby(string lobbyId, string serviceId = null, string impersonatedUserId = null, string ifNoneMatch = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string lobbyId

    The ID of the lobby to execute the request against. It should be composed of 64 characters or less, and only have dashes, underscores and alphanumeric characters.

    string serviceId

    When service authentication is used, this provides a logical identity for the service (optional)

    string impersonatedUserId

    When service authentication is used, this provides a 'playerId' to execute as. If this header is detected, the service request will be identical to a request from the specified player. (optional)

    string ifNoneMatch

    The etag of the record being requested. Results/actions are only returned/executed when the current record version does not match the provided value. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<Lobby>

    The operation

    Heartbeat(string, string, string, object, CancellationToken)

    Heartbeat a lobby

    Declaration
    ApiOperation Heartbeat(string lobbyId, string serviceId = null, string impersonatedUserId = null, object body = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string lobbyId

    The ID of the lobby to execute the request against. It should be composed of 64 characters or less, and only have dashes, underscores and alphanumeric characters.

    string serviceId

    When service authentication is used, this provides a logical identity for the service (optional)

    string impersonatedUserId

    When service authentication is used, this provides a 'playerId' to execute as. If this header is detected, the service request will be identical to a request from the specified player. (optional)

    object body

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    JoinLobbyByCode(string, string, JoinByCodeRequest, CancellationToken)

    Join a lobby with lobby code

    Declaration
    ApiOperation<Lobby> JoinLobbyByCode(string serviceId = null, string impersonatedUserId = null, JoinByCodeRequest joinByCodeRequest = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string serviceId

    When service authentication is used, this provides a logical identity for the service (optional)

    string impersonatedUserId

    When service authentication is used, this provides a 'playerId' to execute as. If this header is detected, the service request will be identical to a request from the specified player. (optional)

    JoinByCodeRequest joinByCodeRequest

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<Lobby>

    The operation

    JoinLobbyById(string, string, string, JoinByIdRequest, CancellationToken)

    Join a lobby with lobby ID

    Declaration
    ApiOperation<Lobby> JoinLobbyById(string lobbyId, string serviceId = null, string impersonatedUserId = null, JoinByIdRequest joinByIdRequest = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string lobbyId

    The ID of the lobby to execute the request against. It should be composed of 64 characters or less, and only have dashes, underscores and alphanumeric characters.

    string serviceId

    When service authentication is used, this provides a logical identity for the service (optional)

    string impersonatedUserId

    When service authentication is used, this provides a 'playerId' to execute as. If this header is detected, the service request will be identical to a request from the specified player. (optional)

    JoinByIdRequest joinByIdRequest

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<Lobby>

    The operation

    QueryLobbies(string, string, QueryRequest, CancellationToken)

    Query public lobbies

    Declaration
    ApiOperation<QueryResponse> QueryLobbies(string serviceId = null, string impersonatedUserId = null, QueryRequest queryRequest = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string serviceId

    When service authentication is used, this provides a logical identity for the service (optional)

    string impersonatedUserId

    When service authentication is used, this provides a 'playerId' to execute as. If this header is detected, the service request will be identical to a request from the specified player. (optional)

    QueryRequest queryRequest

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<QueryResponse>

    The operation

    QuickJoinLobby(string, string, QuickJoinRequest, CancellationToken)

    Query available lobbies and join a random one

    Declaration
    ApiOperation<Lobby> QuickJoinLobby(string serviceId = null, string impersonatedUserId = null, QuickJoinRequest quickJoinRequest = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string serviceId

    When service authentication is used, this provides a logical identity for the service (optional)

    string impersonatedUserId

    When service authentication is used, this provides a 'playerId' to execute as. If this header is detected, the service request will be identical to a request from the specified player. (optional)

    QuickJoinRequest quickJoinRequest

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<Lobby>

    The operation

    Reconnect(string, string, string, object, CancellationToken)

    Reconnect to a lobby after disconnecting

    Declaration
    ApiOperation<Lobby> Reconnect(string lobbyId, string serviceId = null, string impersonatedUserId = null, object body = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string lobbyId

    The ID of the lobby to execute the request against. It should be composed of 64 characters or less, and only have dashes, underscores and alphanumeric characters.

    string serviceId

    When service authentication is used, this provides a logical identity for the service (optional)

    string impersonatedUserId

    When service authentication is used, this provides a 'playerId' to execute as. If this header is detected, the service request will be identical to a request from the specified player. (optional)

    object body

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<Lobby>

    The operation

    RemovePlayer(string, string, string, string, CancellationToken)

    Remove a player

    Declaration
    ApiOperation RemovePlayer(string lobbyId, string playerId, string serviceId = null, string impersonatedUserId = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string lobbyId

    The ID of the lobby to execute the request against. It should be composed of 64 characters or less, and only have dashes, underscores and alphanumeric characters.

    string playerId

    The ID of the player to execute the request against.

    string serviceId

    When service authentication is used, this provides a logical identity for the service (optional)

    string impersonatedUserId

    When service authentication is used, this provides a 'playerId' to execute as. If this header is detected, the service request will be identical to a request from the specified player. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    RequestTokens(string, List<TokenRequest>, string, string, CancellationToken)

    Authentication token request

    Declaration
    ApiOperation<Dictionary<string, TokenData>> RequestTokens(string lobbyId, List<TokenRequest> tokenRequest, string serviceId = null, string impersonatedUserId = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string lobbyId

    The ID of the lobby to execute the request against. It should be composed of 64 characters or less, and only have dashes, underscores and alphanumeric characters.

    List<TokenRequest> tokenRequest
    string serviceId

    When service authentication is used, this provides a logical identity for the service (optional)

    string impersonatedUserId

    When service authentication is used, this provides a 'playerId' to execute as. If this header is detected, the service request will be identical to a request from the specified player. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<Dictionary<string, TokenData>>

    The operation

    UpdateLobby(string, string, string, UpdateRequest, CancellationToken)

    Update lobby data

    Declaration
    ApiOperation<Lobby> UpdateLobby(string lobbyId, string serviceId = null, string impersonatedUserId = null, UpdateRequest updateRequest = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string lobbyId

    The ID of the lobby to execute the request against. It should be composed of 64 characters or less, and only have dashes, underscores and alphanumeric characters.

    string serviceId

    When service authentication is used, this provides a logical identity for the service (optional)

    string impersonatedUserId

    When service authentication is used, this provides a 'playerId' to execute as. If this header is detected, the service request will be identical to a request from the specified player. (optional)

    UpdateRequest updateRequest

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<Lobby>

    The operation

    UpdatePlayer(string, string, string, string, PlayerUpdateRequest, CancellationToken)

    Update player data

    Declaration
    ApiOperation<Lobby> UpdatePlayer(string lobbyId, string playerId, string serviceId = null, string impersonatedUserId = null, PlayerUpdateRequest playerUpdateRequest = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string lobbyId

    The ID of the lobby to execute the request against. It should be composed of 64 characters or less, and only have dashes, underscores and alphanumeric characters.

    string playerId

    The ID of the player to execute the request against.

    string serviceId

    When service authentication is used, this provides a logical identity for the service (optional)

    string impersonatedUserId

    When service authentication is used, this provides a 'playerId' to execute as. If this header is detected, the service request will be identical to a request from the specified player. (optional)

    PlayerUpdateRequest playerUpdateRequest

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<Lobby>

    The operation

    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)