Class MatchmakerBackfillApi
Represents a collection of functions to interact with the API endpoints
Inherited Members
Namespace: Unity.Services.Apis.Matchmaker
Assembly: Unity.Services.Apis.dll
Syntax
public class MatchmakerBackfillApi : IMatchmakerBackfillApi, IApiAccessor
Constructors
MatchmakerBackfillApi(IApiClient)
Initializes a new instance of the Matchmaker
Declaration
public MatchmakerBackfillApi(IApiClient apiClient)
Parameters
Type | Name | Description |
---|---|---|
IApi |
apiClient | The client interface for synchronous API access. |
MatchmakerBackfillApi(IApiClient, IApiConfiguration)
Initializes a new instance of the Matchmaker
Declaration
public MatchmakerBackfillApi(IApiClient apiClient, IApiConfiguration apiConfiguration)
Parameters
Type | Name | Description |
---|---|---|
IApi |
apiClient | The client interface for synchronous API access. |
IApi |
apiConfiguration | The configuration object. |
Properties
Client
The client for accessing this underlying API asynchronously.
Declaration
public IApiClient Client { get; }
Property Value
Type | Description |
---|---|
IApi |
Configuration
Gets the configuration object
Declaration
public IApiConfiguration Configuration { get; }
Property Value
Type | Description |
---|---|
IApi |
An instance of the Configuration |
Methods
ApproveBackfillTicket(string, CancellationToken)
Approve a backfill ticket Returns the BackfillTicket. Approving a backfill ticket allows all proposed tickets associated with that backfill ticket to be assigned. To get players using backfill, call this periodically.<br>It is recommended that this be called no faster than once a second while backfill is in progress.<br>This request should only be performed by the dedicated game server.
Declaration
public ApiOperation<BackfillTicket> ApproveBackfillTicket(string id, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | id | Ticket ID or Backfill Ticket ID. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
CreateBackfillTicket(CreateBackfillTicketRequest, CancellationToken)
Create a backfill ticket A request allowing the game server to receive new players from the matchmaker.<br>The request should contain the teams, theirs players and the players information so that the matchmaker can add players to that match.<br>The request should only be performed by the dedicated game server.
Declaration
public ApiOperation<CreateBackfillTicketResponse> CreateBackfillTicket(CreateBackfillTicketRequest createBackfillTicketRequest = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Create |
createBackfillTicketRequest | (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
DeleteBackfillTicket(string, CancellationToken)
Delete a backfill ticket When a backfill ticket is deleted, the matchmaker rejects all proposed tickets associated with that backfill ticket.<br>Rejected tickets return to the tickets pool and can be matched again.<br>This should be called when backfill ends and the request is only made by the dedicated game server.
Declaration
public ApiOperation DeleteBackfillTicket(string id, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | id | Ticket ID or Backfill Ticket ID. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetBasePath()
Gets the base path of the API client.
Declaration
public string GetBasePath()
Returns
Type | Description |
---|---|
string | The base path |
UpdateBackfillTicket(string, BackfillTicket, CancellationToken)
Update a backfill ticket This should be called when the server state changes in order to reflect the current server state, such as when people leave the server or when people join the server without the involvement of the matchmaker.<br>Updating a backfill ticket will reject all unapproved tickets associated with that backfill ticket. Rejected tickets will return to the pool of tickets queryable by the matchmaker if they were not approved.<br>The request should only be performed by the dedicated game server.
Declaration
public ApiOperation UpdateBackfillTicket(string id, BackfillTicket backfillTicket = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | id | Ticket ID or Backfill Ticket ID. |
Backfill |
backfillTicket | (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |