Skip to content

Resource BattleRankingResource

CrucifiedPain edited this page Jun 26, 2026 · 10 revisions

BattleRankingResource (client.battle_ranking)

Endpoints: • battleRanking.getRanking

.get()

Get battle rankings.

Args: data_type: What to rank by — damage, points, or money. type: Entity type — user, country, or mu. side: Which side — attacker or defender. battle_id: Optional filter by battle. round_id: Optional filter by round. war_id: Optional filter by war.

Signature

await client.battleranking.get(data_type: 'BattleRankingDataType | str', type: 'BattleRankingEntityType | str', side: 'BattleRankingSide | str', *, battle_id: 'str | None' = None, round_id: 'str | None' = None, war_id: 'str | None' = None) -> 'list[BattleRankingEntry]'

Parameters

Name Type Default
data_type BattleRankingDataType | str *Required*
type BattleRankingEntityType | str *Required*
side BattleRankingSide | str *Required*
battle_id str None
round_id str None
war_id str None

Return Models

BattleRankingEntry

Field Type Required Description
_id string Optional
__v integer Optional
rank integer Optional The rank.
user string Optional
entityType string Optional The entity type.
name string Optional The official name of the country.
country string Optional
value number Optional The value.
side string Optional The side.

.invalidate_cache()

Clear the SWR cache for all resources.

Signature

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

Clone this wiki locally