widgrensitasobi-defold
widgrensit/asobi-defold/asobi.api.tournaments
asobi tournaments over REST. A project reaches it as client.tournaments.
- 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_tournaments from "asobi.api.tournaments"
- Pick a release from widgrensit/asobi-defold releases and add its Source code (zip) URL (or a packaged
Functions
list(client: Client, opts?: TournamentListOptions, callback?: HttpCallback)
Fetches tournaments.
Parameters
client:Client— The client.opts?:TournamentListOptions— The filters.callback?:HttpCallback— Receives the tournaments, or the error.
get(client: Client, tournament_id: string, callback?: HttpCallback)
Fetches one tournament.
Parameters
client:Client— The client.tournament_id:string— The tournament's id.callback?:HttpCallback— Receives the tournament, or the error.
join(client: Client, tournament_id: string, callback?: HttpCallback)
Joins a tournament.
Parameters
client:Client— The client.tournament_id:string— The tournament's id.callback?:HttpCallback— Receives the server's answer, or the error.
Types
TournamentListOptions
TournamentListOptions.status?: string
Only tournaments with this status.
TournamentListOptions.limit?: number
The most tournaments to return.