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 Optional
__v integer Optional
name string Optional The official name of the country.
description string Optional The description.
isActive boolean Optional Whether the user has logged in recently and is considered an active player.
status string Optional The status.
startAt string Optional The timestamp when the battle officially commenced.
teamSize number Optional The team size.
teamCount integer Optional The total number of team.
roundsCount integer Optional The total number of rounds.
type string Optional The type.
maxRarity string Optional The max rarity.
skillKey string Optional The skill key.
autoQualify1stRound array[string] Optional
registered TournamentRegistered Optional The registered.
activeRound integer Optional The active round.
rounds object Optional
winnerTournamentTeam string Optional The winner tournament team.
createdAt string Optional The timestamp when this record was created.
updatedAt string Optional The timestamp when this record was last modified.

TournamentMatch

Field Type Required Description
_id string Optional
__v integer Optional
matchIndex integer Optional The match index.
predecessors TournamentMatchPredecessors Optional The predecessors.
attacker string Optional The UUID of the country initiating the battle.
defender string Optional The UUID of the country defending the region.
isQualificationRound boolean Optional The is qualification round.
battle string Optional The battle.
wonBy string Optional The won by.
possibleAttackerTeamIds array[string] Optional The possible attacker team ids.
possibleDefenderTeamIds array[string] Optional The possible defender team ids.

TournamentMatchPredecessors

Field Type Required Description
_id string Optional
__v integer Optional
attacker integer Optional The UUID of the country initiating the battle.
defender integer Optional The UUID of the country defending the region.

TournamentRegistered

Field Type Required Description
_id string Optional
__v integer Optional
countries array[string] Optional
mus array[string] Optional
users array[string] Optional

TournamentRound

Field Type Required Description
_id string Optional
__v integer Optional
roundNumber integer Optional The round number.
cases number Optional The cases.
skillValue number Optional The skill value.
isQualificationRound boolean Optional The is qualification round.
matches array[TournamentMatch] Optional

.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 Optional
__v integer Optional
tournament string Optional The tournament.
number integer Optional The number.
countries array[string] Optional
mus array[string] Optional
users array[string] Optional
participants array[string] Optional
colorScheme string Optional The color scheme.
estimatedUsers integer Optional The estimated users.
status string Optional The status.
createdAt string Optional The timestamp when this record was created.
updatedAt string Optional The timestamp when this record was last modified.

.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 Optional
__v integer Optional
tournament string Optional The tournament.
number integer Optional The number.
countries array[string] Optional
mus array[string] Optional
users array[string] Optional
participants array[string] Optional
colorScheme string Optional The color scheme.
estimatedUsers integer Optional The estimated users.
status string Optional The status.
createdAt string Optional The timestamp when this record was created.
updatedAt string Optional The timestamp when this record was last modified.

.invalidate_cache()

Clear the SWR cache for all resources.

Signature

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

Clone this wiki locally