Skip to Content
defold-typescript libraries
widgrensitasobi-defold

widgrensit/asobi-defold/asobi.api.matches

asobi matches over REST. A project reaches it as client.matches.

  • 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_matches from "asobi.api.matches"

Functions

list(client: Client, opts?: MatchListOptions, callback?: HttpCallback)

Fetches matches.

Parameters

  • client: Client — The client.
  • opts?: MatchListOptions — The filters.
  • callback?: HttpCallback — Receives the matches, or the error.

live(client: Client, opts?: LiveMatchOptions, callback?: HttpCallback)

Fetches the running matches.

Parameters

  • client: Client — The client.
  • opts?: LiveMatchOptions — The filters.
  • callback?: HttpCallback — Receives the matches, or the error.

get(client: Client, match_id: string, callback?: HttpCallback)

Fetches one match.

Parameters

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

Types

MatchListOptions

MatchListOptions.mode?: string

Only matches of this mode.

MatchListOptions.status?: string

Only matches with this status.

MatchListOptions.limit?: number

The most matches to return.

LiveMatchOptions

LiveMatchOptions.mode?: string

Only matches of this mode.

LiveMatchOptions.has_capacity?: boolean

Only matches that have, or lack, room for another player.

On this page