Skip to content

Resource TournamentResource

CrucifiedPain edited this page Jun 26, 2026 · 9 revisions

TournamentResource (client.tournament)

Endpoints: • tournament.getLastTournament • tournamentTeam.getById • tournamentTeam.getByTournamentId

.get_last_tournament()

Get the latest tournament details.

Signature

await client.tournament.get_last_tournament() -> 'Tournament'

Return Models

Tournament

Field Type Required Description
_id string \| null
__v integer \| null
name string \| null
description string \| null
isActive boolean \| null
status string \| null
startAt string \| null
teamSize number \| null
teamCount integer \| null
roundsCount integer \| null
type string \| null
maxRarity string \| null
skillKey string \| null
autoQualify1stRound array[string]
registered TournamentRegistered \| null
activeRound integer \| null
rounds object
winnerTournamentTeam string \| null
createdAt string \| null
updatedAt string \| null

TournamentMatch

Field Type Required Description
_id string \| null
__v integer \| null
matchIndex integer \| null
predecessors TournamentMatchPredecessors \| null
attacker string \| null
defender string \| null
isQualificationRound boolean \| null
battle string \| null
wonBy string \| null
possibleAttackerTeamIds array[string] \| null
possibleDefenderTeamIds array[string] \| null

TournamentMatchPredecessors

Field Type Required Description
_id string \| null
__v integer \| null
attacker integer \| null
defender integer \| null

TournamentRegistered

Field Type Required Description
_id string \| null
__v integer \| null
countries array[string]
mus array[string]
users array[string]

TournamentRound

Field Type Required Description
_id string \| null
__v integer \| null
roundNumber integer \| null
cases number \| null
skillValue number \| null
isQualificationRound boolean \| null
matches array[TournamentMatch]

.get_team_by_id()

Get a tournament team by its ID.

Signature

await client.tournament.get_team_by_id(tournament_team_id: 'str') -> 'TournamentTeam'

Parameters

Name Type Default
tournament_team_id str *Required*

Return Models

TournamentTeam

Field Type Required Description
_id string \| null
__v integer \| null
tournament string \| null
number integer \| null
countries array[string]
mus array[string]
users array[string]
participants array[string]
colorScheme string \| null
estimatedUsers integer \| null
status string \| null
createdAt string \| null
updatedAt string \| null

.get_teams_by_tournament()

Get all teams for a specific tournament.

Signature

await client.tournament.get_teams_by_tournament(tournament_id: 'str') -> 'list[TournamentTeam]'

Parameters

Name Type Default
tournament_id str *Required*

Return Models

TournamentTeam

Field Type Required Description
_id string \| null
__v integer \| null
tournament string \| null
number integer \| null
countries array[string]
mus array[string]
users array[string]
participants array[string]
colorScheme string \| null
estimatedUsers integer \| null
status string \| null
createdAt string \| null
updatedAt string \| null

.invalidate_cache()

Clear the SWR cache for all resources.

Signature

await client.tournament.invalidate_cache() -> 'None'

Clone this wiki locally