Class MatchmakerTicketsApi
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 MatchmakerTicketsApi : IMatchmakerTicketsApi, IApiAccessor
Constructors
MatchmakerTicketsApi(IApiClient)
Initializes a new instance of the Matchmaker
Declaration
public MatchmakerTicketsApi(IApiClient apiClient)
Parameters
Type | Name | Description |
---|---|---|
IApi |
apiClient | The client interface for synchronous API access. |
MatchmakerTicketsApi(IApiClient, IApiConfiguration)
Initializes a new instance of the Matchmaker
Declaration
public MatchmakerTicketsApi(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
CreateTicket(string, CreateTicketRequest, CancellationToken)
Create a matchmaking ticket Start matchmaking by creating a matchmaking ticket. Returns the ticket ID of the ticket created.
Declaration
public ApiOperation<CreateTicketResponse> CreateTicket(string impersonatedUserId = null, CreateTicketRequest createTicketRequest = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | impersonatedUserId | When called with a service account, used to specify the player-id to create the ticket on behalf of. (optional) |
Create |
createTicketRequest | (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
DeleteTicket(string, string, CancellationToken)
Delete a matchmaking ticket End matchmaking by deleting a matchmaking ticket using its ticket ID. This is called when the user wants to cancel matchmaking.
Declaration
public ApiOperation DeleteTicket(string id, string impersonatedUserId = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | id | Ticket ID or Backfill Ticket ID. The ID is obtained from the response of the Create operation. |
string | impersonatedUserId | When called with a service account, used to specify the player-id to create the ticket on behalf of. (optional) |
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 |
GetTicketStatus(string, string, CancellationToken)
Gets the status of a ticket match assignment in the matchmaker Gets the status of a ticket match assignment in the Matchmaker.<br>Poll this resource until the match assignment is fulfilled. Rate of polling should not be more than once every second.
Declaration
public ApiOperation<TicketStatusResponse> GetTicketStatus(string id, string impersonatedUserId = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | id | Ticket ID or Backfill Ticket ID. The ID is obtained from the response of the Create operation. |
string | impersonatedUserId | When called with a service account, used to specify the player-id to create the ticket on behalf of. (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |