-
Notifications
You must be signed in to change notification settings - Fork 2
Resource RegionResource
CrucifiedPain edited this page Jun 26, 2026
·
10 revisions
Endpoints: • region.getById • region.getRegionsObject
Get a single region by ID.
await client.region.get(region_id: 'str') -> 'Region'| Name | Type | Default |
|---|---|---|
region_id |
str |
*Required* |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
war |
string |
Optional | |
region |
string |
Optional | |
attacker_country_id |
string |
Optional | |
defender_country_id |
string |
Optional | |
attacker |
BattleSide |
Optional | The UUID of the country initiating the battle. |
defender |
BattleSide |
Optional | The UUID of the country defending the region. |
attackerScore |
number |
Optional | The attacker score. |
defenderScore |
number |
Optional | The defender score. |
isActive |
boolean |
Optional | Whether the user has logged in recently and is considered an active player. |
isSystemResistance |
boolean |
Optional | The is system resistance. |
isBigBattle |
boolean |
Optional | The is big battle. |
winner_country |
string |
Optional | |
startTime |
string |
Optional | The start time. |
endTime |
string |
Optional | The end time. |
currentRound |
string | integer | object |
Optional | The current round. API returns a round ID string, an int, or a full round object. |
rounds |
array[string] |
Optional | The rounds. |
roundsHistory |
array[any] |
Optional | The rounds history. |
roundsToWin |
integer |
Optional | The rounds to win. |
totalRounds |
integer |
Optional | The total rounds. |
type |
string |
Optional | The type. |
stats |
BattleStats |
Optional | The stats. |
createdAt |
string |
Optional | The timestamp when this record was created. |
updatedAt |
string |
Optional | The timestamp when this record was last modified. |
Per-side summary (attacker/defender) of a battle.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
country |
string |
Optional | The UUID of the country this user holds citizenship in. |
region |
string |
Optional | The UUID of the contested region. |
damages |
number |
Optional | The damages. |
hitCount |
integer |
Optional | The total number of hit. |
wonRoundsCount |
integer |
Optional | The total number of won rounds. |
countryOrders |
array[string] |
Optional | The country orders. |
muOrders |
array[string] |
Optional | The mu orders. |
moneyPool |
number |
Optional | The money pool. |
moneyPer1kDamages |
number |
Optional | |
bountyEffectiveAt |
string |
Optional | The bounty effective at. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
hitCount |
integer |
Optional | The total number of hit. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
name |
string |
Optional | The official name of the country. |
code |
string |
Optional | The code. |
mainCity |
string |
Optional | The main city. |
country |
string |
Optional | The UUID of the country this user holds citizenship in. |
countryCode |
string |
Optional | The country code. |
initialCountry |
string |
Optional | The initial country. |
isCapital |
boolean |
Optional | The is capital. |
isLinkedToCapital |
boolean |
Optional | The is linked to capital. |
hasCoast |
boolean |
Optional | The has coast. |
biome |
string |
Optional | The biome. |
climate |
string |
Optional | The climate. |
position |
array[number] |
Optional | The position. |
neighbors |
array[string] |
Optional | The neighbors. |
development |
number |
Optional | The development. |
baseDevelopment |
number |
Optional | The base development. |
currentPopulation |
integer |
Optional | The current population. |
resistance |
number |
Optional | The resistance. |
resistanceMax |
number |
Optional | The resistance max. |
strategicResource |
string |
Optional | The strategic resource. |
deposit |
RegionDeposit |
Optional | The deposit. |
stats |
RegionStats |
Optional | The stats. |
dates |
RegionDates |
Optional | The dates. |
activeUpgradeLevels |
RegionActiveUpgradeLevels |
Optional | The active upgrade levels. |
upgradesV2 |
RegionUpgradesV2 |
Optional | The upgrades v2. |
activeBattle |
Battle |
Optional | The active battle. |
lastBattleEndedAt |
string |
Optional | The timestamp of the last battle ended event. |
lastResistanceContributionAt |
string |
Optional | The timestamp of the last resistance contribution event. |
lastRevoltEndedAt |
string |
Optional | The timestamp of the last revolt ended event. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
base |
integer |
Optional | The base. |
bunker |
integer |
Optional | The bunker. |
pacificationCenter |
integer |
Optional | The pacification center. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
lastOwnershipChangeAt |
string |
Optional | The timestamp of the last ownership change event. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
type |
string |
Optional | The type. |
bonusPercent |
number |
Optional | The bonus percent. |
startsAt |
string |
Optional | The starts at. |
endsAt |
string |
Optional | The ends at. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
investedMoney |
number |
Optional | The invested money. |
State of a single region upgrade (base, bunker, ...).
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
level |
integer |
Optional | The current overall level of the entity. |
status |
string |
Optional | The status. |
statusChangedAt |
string |
Optional | The status changed at. |
constructionPoints |
number |
Optional | The construction points. |
investedMoney |
number |
Optional | The invested money. |
isUnderConstruction |
boolean |
Optional | The is under construction. |
constructionStartedAt |
string |
Optional | The construction started at. |
constructionEndedAt |
string |
Optional | The construction ended at. |
lastConstructions |
array[RegionUpgradeConstruction] |
Optional | The timestamp of the last constructions event. |
One contribution entry in an upgrade's construction history.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
construction |
number |
Optional | The construction. |
constructionAt |
string |
Optional | The construction at. |
user |
string |
Optional | The user. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
upgrades |
object |
Optional | The upgrades. |
activeConstructionCount |
integer |
Optional | The total number of active construction. |
Get all regions as a dict keyed by region ID.
await client.region.get_all() -> 'dict[str, Region]'| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
war |
string |
Optional | |
region |
string |
Optional | |
attacker_country_id |
string |
Optional | |
defender_country_id |
string |
Optional | |
attacker |
BattleSide |
Optional | The UUID of the country initiating the battle. |
defender |
BattleSide |
Optional | The UUID of the country defending the region. |
attackerScore |
number |
Optional | The attacker score. |
defenderScore |
number |
Optional | The defender score. |
isActive |
boolean |
Optional | Whether the user has logged in recently and is considered an active player. |
isSystemResistance |
boolean |
Optional | The is system resistance. |
isBigBattle |
boolean |
Optional | The is big battle. |
winner_country |
string |
Optional | |
startTime |
string |
Optional | The start time. |
endTime |
string |
Optional | The end time. |
currentRound |
string | integer | object |
Optional | The current round. API returns a round ID string, an int, or a full round object. |
rounds |
array[string] |
Optional | The rounds. |
roundsHistory |
array[any] |
Optional | The rounds history. |
roundsToWin |
integer |
Optional | The rounds to win. |
totalRounds |
integer |
Optional | The total rounds. |
type |
string |
Optional | The type. |
stats |
BattleStats |
Optional | The stats. |
createdAt |
string |
Optional | The timestamp when this record was created. |
updatedAt |
string |
Optional | The timestamp when this record was last modified. |
Per-side summary (attacker/defender) of a battle.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
country |
string |
Optional | The UUID of the country this user holds citizenship in. |
region |
string |
Optional | The UUID of the contested region. |
damages |
number |
Optional | The damages. |
hitCount |
integer |
Optional | The total number of hit. |
wonRoundsCount |
integer |
Optional | The total number of won rounds. |
countryOrders |
array[string] |
Optional | The country orders. |
muOrders |
array[string] |
Optional | The mu orders. |
moneyPool |
number |
Optional | The money pool. |
moneyPer1kDamages |
number |
Optional | |
bountyEffectiveAt |
string |
Optional | The bounty effective at. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
hitCount |
integer |
Optional | The total number of hit. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
name |
string |
Optional | The official name of the country. |
code |
string |
Optional | The code. |
mainCity |
string |
Optional | The main city. |
country |
string |
Optional | The UUID of the country this user holds citizenship in. |
countryCode |
string |
Optional | The country code. |
initialCountry |
string |
Optional | The initial country. |
isCapital |
boolean |
Optional | The is capital. |
isLinkedToCapital |
boolean |
Optional | The is linked to capital. |
hasCoast |
boolean |
Optional | The has coast. |
biome |
string |
Optional | The biome. |
climate |
string |
Optional | The climate. |
position |
array[number] |
Optional | The position. |
neighbors |
array[string] |
Optional | The neighbors. |
development |
number |
Optional | The development. |
baseDevelopment |
number |
Optional | The base development. |
currentPopulation |
integer |
Optional | The current population. |
resistance |
number |
Optional | The resistance. |
resistanceMax |
number |
Optional | The resistance max. |
strategicResource |
string |
Optional | The strategic resource. |
deposit |
RegionDeposit |
Optional | The deposit. |
stats |
RegionStats |
Optional | The stats. |
dates |
RegionDates |
Optional | The dates. |
activeUpgradeLevels |
RegionActiveUpgradeLevels |
Optional | The active upgrade levels. |
upgradesV2 |
RegionUpgradesV2 |
Optional | The upgrades v2. |
activeBattle |
Battle |
Optional | The active battle. |
lastBattleEndedAt |
string |
Optional | The timestamp of the last battle ended event. |
lastResistanceContributionAt |
string |
Optional | The timestamp of the last resistance contribution event. |
lastRevoltEndedAt |
string |
Optional | The timestamp of the last revolt ended event. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
base |
integer |
Optional | The base. |
bunker |
integer |
Optional | The bunker. |
pacificationCenter |
integer |
Optional | The pacification center. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
lastOwnershipChangeAt |
string |
Optional | The timestamp of the last ownership change event. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
type |
string |
Optional | The type. |
bonusPercent |
number |
Optional | The bonus percent. |
startsAt |
string |
Optional | The starts at. |
endsAt |
string |
Optional | The ends at. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
investedMoney |
number |
Optional | The invested money. |
State of a single region upgrade (base, bunker, ...).
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
level |
integer |
Optional | The current overall level of the entity. |
status |
string |
Optional | The status. |
statusChangedAt |
string |
Optional | The status changed at. |
constructionPoints |
number |
Optional | The construction points. |
investedMoney |
number |
Optional | The invested money. |
isUnderConstruction |
boolean |
Optional | The is under construction. |
constructionStartedAt |
string |
Optional | The construction started at. |
constructionEndedAt |
string |
Optional | The construction ended at. |
lastConstructions |
array[RegionUpgradeConstruction] |
Optional | The timestamp of the last constructions event. |
One contribution entry in an upgrade's construction history.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
construction |
number |
Optional | The construction. |
constructionAt |
string |
Optional | The construction at. |
user |
string |
Optional | The user. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
upgrades |
object |
Optional | The upgrades. |
activeConstructionCount |
integer |
Optional | The total number of active construction. |
Fetch multiple regions by ID concurrently using the auto-batcher.
await client.region.get_many(region_ids: 'list[str]') -> 'list[Region | None]'| Name | Type | Default |
|---|---|---|
region_ids |
list[str] |
*Required* |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
war |
string |
Optional | |
region |
string |
Optional | |
attacker_country_id |
string |
Optional | |
defender_country_id |
string |
Optional | |
attacker |
BattleSide |
Optional | The UUID of the country initiating the battle. |
defender |
BattleSide |
Optional | The UUID of the country defending the region. |
attackerScore |
number |
Optional | The attacker score. |
defenderScore |
number |
Optional | The defender score. |
isActive |
boolean |
Optional | Whether the user has logged in recently and is considered an active player. |
isSystemResistance |
boolean |
Optional | The is system resistance. |
isBigBattle |
boolean |
Optional | The is big battle. |
winner_country |
string |
Optional | |
startTime |
string |
Optional | The start time. |
endTime |
string |
Optional | The end time. |
currentRound |
string | integer | object |
Optional | The current round. API returns a round ID string, an int, or a full round object. |
rounds |
array[string] |
Optional | The rounds. |
roundsHistory |
array[any] |
Optional | The rounds history. |
roundsToWin |
integer |
Optional | The rounds to win. |
totalRounds |
integer |
Optional | The total rounds. |
type |
string |
Optional | The type. |
stats |
BattleStats |
Optional | The stats. |
createdAt |
string |
Optional | The timestamp when this record was created. |
updatedAt |
string |
Optional | The timestamp when this record was last modified. |
Per-side summary (attacker/defender) of a battle.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
country |
string |
Optional | The UUID of the country this user holds citizenship in. |
region |
string |
Optional | The UUID of the contested region. |
damages |
number |
Optional | The damages. |
hitCount |
integer |
Optional | The total number of hit. |
wonRoundsCount |
integer |
Optional | The total number of won rounds. |
countryOrders |
array[string] |
Optional | The country orders. |
muOrders |
array[string] |
Optional | The mu orders. |
moneyPool |
number |
Optional | The money pool. |
moneyPer1kDamages |
number |
Optional | |
bountyEffectiveAt |
string |
Optional | The bounty effective at. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
hitCount |
integer |
Optional | The total number of hit. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
name |
string |
Optional | The official name of the country. |
code |
string |
Optional | The code. |
mainCity |
string |
Optional | The main city. |
country |
string |
Optional | The UUID of the country this user holds citizenship in. |
countryCode |
string |
Optional | The country code. |
initialCountry |
string |
Optional | The initial country. |
isCapital |
boolean |
Optional | The is capital. |
isLinkedToCapital |
boolean |
Optional | The is linked to capital. |
hasCoast |
boolean |
Optional | The has coast. |
biome |
string |
Optional | The biome. |
climate |
string |
Optional | The climate. |
position |
array[number] |
Optional | The position. |
neighbors |
array[string] |
Optional | The neighbors. |
development |
number |
Optional | The development. |
baseDevelopment |
number |
Optional | The base development. |
currentPopulation |
integer |
Optional | The current population. |
resistance |
number |
Optional | The resistance. |
resistanceMax |
number |
Optional | The resistance max. |
strategicResource |
string |
Optional | The strategic resource. |
deposit |
RegionDeposit |
Optional | The deposit. |
stats |
RegionStats |
Optional | The stats. |
dates |
RegionDates |
Optional | The dates. |
activeUpgradeLevels |
RegionActiveUpgradeLevels |
Optional | The active upgrade levels. |
upgradesV2 |
RegionUpgradesV2 |
Optional | The upgrades v2. |
activeBattle |
Battle |
Optional | The active battle. |
lastBattleEndedAt |
string |
Optional | The timestamp of the last battle ended event. |
lastResistanceContributionAt |
string |
Optional | The timestamp of the last resistance contribution event. |
lastRevoltEndedAt |
string |
Optional | The timestamp of the last revolt ended event. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
base |
integer |
Optional | The base. |
bunker |
integer |
Optional | The bunker. |
pacificationCenter |
integer |
Optional | The pacification center. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
lastOwnershipChangeAt |
string |
Optional | The timestamp of the last ownership change event. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
type |
string |
Optional | The type. |
bonusPercent |
number |
Optional | The bonus percent. |
startsAt |
string |
Optional | The starts at. |
endsAt |
string |
Optional | The ends at. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
investedMoney |
number |
Optional | The invested money. |
State of a single region upgrade (base, bunker, ...).
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
level |
integer |
Optional | The current overall level of the entity. |
status |
string |
Optional | The status. |
statusChangedAt |
string |
Optional | The status changed at. |
constructionPoints |
number |
Optional | The construction points. |
investedMoney |
number |
Optional | The invested money. |
isUnderConstruction |
boolean |
Optional | The is under construction. |
constructionStartedAt |
string |
Optional | The construction started at. |
constructionEndedAt |
string |
Optional | The construction ended at. |
lastConstructions |
array[RegionUpgradeConstruction] |
Optional | The timestamp of the last constructions event. |
One contribution entry in an upgrade's construction history.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
construction |
number |
Optional | The construction. |
constructionAt |
string |
Optional | The construction at. |
user |
string |
Optional | The user. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
upgrades |
object |
Optional | The upgrades. |
activeConstructionCount |
integer |
Optional | The total number of active construction. |
Clear the SWR cache for all resources.
await client.region.invalidate_cache() -> 'None'- action_log
- alliance
- article
- battle
- battle_loot_summary
- battle_order
- battle_ranking
- company
- country
- donation
- election
- event
- game_config
- game_stat
- government
- inventory
- item_trading
- mercenary_contract_auction
- mu
- mu_member
- party
- ranking
- region
- round
- search
- tournament
- transaction
- upgrade
- user
- work
- work_offer
- worker