Documentation

BackfillApi

Import

Import

  • const { BackfillApi } = require("@unity-services/matchmaker-2.0");

Constructors

Constructor

  • Parameters

    • Optional configuration: Configuration
    • basePath: string = ...
    • axios: AxiosInstance = ...

    Returns BackfillApi

Methods

Approve Backfill Ticket

  • approveBackfillTicket(id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<BackfillTicket>>
  • 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.
    It is recommended that this be called no faster than once a second while backfill is in progress.
    This request should only be performed by the dedicated game server.

    summary

    Approve a backfill ticket

    throws

    {RequiredError}

    memberof

    BackfillApi

    Parameters

    • id: string

      Ticket ID or Backfill Ticket ID.

    • Optional options: AxiosRequestConfig

    Returns Promise<AxiosResponse<BackfillTicket>>

Create Backfill Ticket

  • A request allowing the game server to receive new players from the matchmaker.
    The request should contain the teams, theirs players and the players information so that the matchmaker can add players to that match.
    The request should only be performed by the dedicated game server.

    summary

    Create a backfill ticket

    throws

    {RequiredError}

    memberof

    BackfillApi

    Parameters

    Returns Promise<AxiosResponse<CreateBackfillTicketResponse>>

Delete Backfill Ticket

  • deleteBackfillTicket(id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>
  • When a backfill ticket is deleted, the matchmaker rejects all proposed tickets associated with that backfill ticket.
    Rejected tickets return to the tickets pool and can be matched again.
    This should be called when backfill ends and the request is only made by the dedicated game server.

    summary

    Delete a backfill ticket

    throws

    {RequiredError}

    memberof

    BackfillApi

    Parameters

    • id: string

      Ticket ID or Backfill Ticket ID.

    • Optional options: AxiosRequestConfig

    Returns Promise<AxiosResponse<void>>

Update Backfill Ticket

  • updateBackfillTicket(id: string, backfillTicket?: BackfillTicket, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>
  • 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.
    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.
    The request should only be performed by the dedicated game server.

    summary

    Update a backfill ticket

    throws

    {RequiredError}

    memberof

    BackfillApi

    Parameters

    • id: string

      Ticket ID or Backfill Ticket ID.

    • Optional backfillTicket: BackfillTicket
    • Optional options: AxiosRequestConfig

    Returns Promise<AxiosResponse<void>>