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- Pick a release from widgrensit/asobi-defold releases and add its Source code (zip) URL (or a packaged
.zipasset, if the library ships one) togame.projectunder[project]dependencies, then Fetch Libraries in the Defold editor. - Run
bunx @defold-typescript/cli resolveto materialize its types. - Import it under a namespace alias of your choice:
import * as api_matches from "asobi.api.matches"
- Pick a release from widgrensit/asobi-defold releases and add its Source code (zip) URL (or a packaged
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.