Skip to content

Resource RegionResource

CrucifiedPain edited this page Jun 26, 2026 · 10 revisions

RegionResource (client.region)

Endpoints: • region.getById • region.getRegionsObject

.get()

Get a single region by ID.

Signature

await client.region.get(region_id: 'str') -> 'Region'

Parameters

Name Type Default
region_id str *Required*

Return Models

Battle

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.

BattleSide

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.

BattleStats

Field Type Required Description
_id string Optional
__v integer Optional
hitCount integer Optional The total number of hit.

Region

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.

RegionActiveUpgradeLevels

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.

RegionDates

Field Type Required Description
_id string Optional
__v integer Optional
lastOwnershipChangeAt string Optional The timestamp of the last ownership change event.

RegionDeposit

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.

RegionStats

Field Type Required Description
_id string Optional
__v integer Optional
investedMoney number Optional The invested money.

RegionUpgrade

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.

RegionUpgradeConstruction

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.

RegionUpgradesV2

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()

Get all regions as a dict keyed by region ID.

Signature

await client.region.get_all() -> 'dict[str, Region]'

Return Models

Battle

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.

BattleSide

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.

BattleStats

Field Type Required Description
_id string Optional
__v integer Optional
hitCount integer Optional The total number of hit.

Region

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.

RegionActiveUpgradeLevels

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.

RegionDates

Field Type Required Description
_id string Optional
__v integer Optional
lastOwnershipChangeAt string Optional The timestamp of the last ownership change event.

RegionDeposit

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.

RegionStats

Field Type Required Description
_id string Optional
__v integer Optional
investedMoney number Optional The invested money.

RegionUpgrade

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.

RegionUpgradeConstruction

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.

RegionUpgradesV2

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_many()

Fetch multiple regions by ID concurrently using the auto-batcher.

Signature

await client.region.get_many(region_ids: 'list[str]') -> 'list[Region | None]'

Parameters

Name Type Default
region_ids list[str] *Required*

Return Models

Battle

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.

BattleSide

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.

BattleStats

Field Type Required Description
_id string Optional
__v integer Optional
hitCount integer Optional The total number of hit.

Region

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.

RegionActiveUpgradeLevels

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.

RegionDates

Field Type Required Description
_id string Optional
__v integer Optional
lastOwnershipChangeAt string Optional The timestamp of the last ownership change event.

RegionDeposit

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.

RegionStats

Field Type Required Description
_id string Optional
__v integer Optional
investedMoney number Optional The invested money.

RegionUpgrade

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.

RegionUpgradeConstruction

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.

RegionUpgradesV2

Field Type Required Description
_id string Optional
__v integer Optional
upgrades object Optional The upgrades.
activeConstructionCount integer Optional The total number of active construction.

.invalidate_cache()

Clear the SWR cache for all resources.

Signature

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

Clone this wiki locally