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` No
__v `integer null` No
name `string null` No
description `string null` No
isActive `boolean null` No
status `string null` No
startAt `string null` No
teamSize `number null` No
teamCount `integer null` No
roundsCount `integer null` No
type `string null` No
maxRarity `string null` No
skillKey `string null` No
autoQualify1stRound array[string] No
registered `TournamentRegistered null` No
activeRound `integer null` No
rounds object No
winnerTournamentTeam `string null` No
createdAt `string null` No
updatedAt `string null` No

TournamentMatch

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

TournamentMatchPredecessors

Field Type Required Description
_id `string null` No
__v `integer null` No
attacker `integer null` No
defender `integer null` No

TournamentRegistered

Field Type Required Description
_id `string null` No
__v `integer null` No
countries array[string] No
mus array[string] No
users array[string] No

TournamentRound

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

.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` No
__v `integer null` No
tournament `string null` No
number `integer null` No
countries array[string] No
mus array[string] No
users array[string] No
participants array[string] No
colorScheme `string null` No
estimatedUsers `integer null` No
status `string null` No
createdAt `string null` No
updatedAt `string null` No

.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` No
__v `integer null` No
tournament `string null` No
number `integer null` No
countries array[string] No
mus array[string] No
users array[string] No
participants array[string] No
colorScheme `string null` No
estimatedUsers `integer null` No
status `string null` No
createdAt `string null` No
updatedAt `string null` No

.invalidate_cache()

Clear the SWR cache for all resources.

Signature

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

Clone this wiki locally