Skip to Content
defold-typescript libraries
widgrensitasobi-defold

widgrensit/asobi-defold/asobi.api.matchmaker

The asobi matchmaker over REST. A project reaches it as client.matchmaker.

  • GitHub: widgrensit/asobi-defold — pinned to v1.18.1
    1. Pick a release from widgrensit/asobi-defold releases and add its Source code (zip) URL (or a packaged .zip asset, if the library ships one) to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Import it under a namespace alias of your choice:
      import * as api_matchmaker from "asobi.api.matchmaker"

Functions

add(client: Client, opts?: string | MatchmakerTicket, callback?: HttpCallback)

Queues the signed-in player for a match.

Parameters

  • client: Client — The client.
  • opts?: string | MatchmakerTicket — The mode to queue for, or the ticket. Queues for "default" when left out.
  • callback?: HttpCallback — Receives the ticket, or the error.

status(client: Client, ticket_id: string, callback?: HttpCallback)

Fetches a ticket's state.

Parameters

  • client: Client — The client.
  • ticket_id: string — The ticket's id.
  • callback?: HttpCallback — Receives the ticket, or the error.

cancel(client: Client, ticket_id: string, callback?: HttpCallback)

Leaves the queue.

Parameters

  • client: Client — The client.
  • ticket_id: string — The ticket's id.
  • callback?: HttpCallback — Receives the server's answer, or the error.

Types

MatchmakerTicket

MatchmakerTicket.mode?: string

The mode to queue for. Defaults to "default".

MatchmakerTicket.properties?: Payload

The properties the server matches players on.

On this page