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 null` No
__v `integer null` No
war `string null` No
region `string null` No
attacker_country_id `string null` No
defender_country_id `string null` No
attacker `BattleSide null` No
defender `BattleSide null` No
attackerScore `number null` No
defenderScore `number null` No
isActive `boolean null` No
isSystemResistance `boolean null` No
isBigBattle `boolean null` No
winner_country `string null` No
startTime `string null` No
endTime `string null` No
currentRound `string integer object
rounds `array[string] null` No
roundsHistory `array[any] null` No
roundsToWin `integer null` No
totalRounds `integer null` No
type `string null` No
stats `BattleStats null` No
createdAt `string null` No
updatedAt `string null` No

BattleSide

Per-side summary (attacker/defender) of a battle.

Field Type Required Description
_id `string null` No
__v `integer null` No
country `string null` No
region `string null` No
damages `number null` No
hitCount `integer null` No
wonRoundsCount `integer null` No
countryOrders `array[string] null` No
muOrders `array[string] null` No
moneyPool `number null` No
moneyPer1kDamages `number null` No
bountyEffectiveAt `string null` No

BattleStats

Field Type Required Description
_id `string null` No
__v `integer null` No
hitCount `integer null` No

Region

Field Type Required Description
_id `string null` No
__v `integer null` No
name `string null` No
code `string null` No
mainCity `string null` No
country `string null` No
countryCode `string null` No
initialCountry `string null` No
isCapital `boolean null` No
isLinkedToCapital `boolean null` No
hasCoast `boolean null` No
biome `string null` No
climate `string null` No
position `array[number] null` No
neighbors `array[string] null` No
development `number null` No
baseDevelopment `number null` No
currentPopulation `integer null` No
resistance `number null` No
resistanceMax `number null` No
strategicResource `string null` No
deposit `RegionDeposit null` No
stats `RegionStats null` No
dates `RegionDates null` No
activeUpgradeLevels `RegionActiveUpgradeLevels null` No
upgradesV2 `RegionUpgradesV2 null` No
activeBattle `Battle null` No
lastBattleEndedAt `string null` No
lastResistanceContributionAt `string null` No
lastRevoltEndedAt `string null` No

RegionActiveUpgradeLevels

Field Type Required Description
_id `string null` No
__v `integer null` No
base `integer null` No
bunker `integer null` No
pacificationCenter `integer null` No

RegionDates

Field Type Required Description
_id `string null` No
__v `integer null` No
lastOwnershipChangeAt `string null` No

RegionDeposit

Field Type Required Description
_id `string null` No
__v `integer null` No
type `string null` No
bonusPercent `number null` No
startsAt `string null` No
endsAt `string null` No

RegionStats

Field Type Required Description
_id `string null` No
__v `integer null` No
investedMoney `number null` No

RegionUpgrade

State of a single region upgrade (base, bunker, ...).

Field Type Required Description
_id `string null` No
__v `integer null` No
level `integer null` No
status `string null` No
statusChangedAt `string null` No
constructionPoints `number null` No
investedMoney `number null` No
isUnderConstruction `boolean null` No
constructionStartedAt `string null` No
constructionEndedAt `string null` No
lastConstructions `array[RegionUpgradeConstruction] null` No

RegionUpgradeConstruction

One contribution entry in an upgrade's construction history.

Field Type Required Description
_id `string null` No
__v `integer null` No
construction `number null` No
constructionAt `string null` No
user `string null` No

RegionUpgradesV2

Field Type Required Description
_id `string null` No
__v `integer null` No
upgrades `object null` No
activeConstructionCount `integer null` No

.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 null` No
__v `integer null` No
war `string null` No
region `string null` No
attacker_country_id `string null` No
defender_country_id `string null` No
attacker `BattleSide null` No
defender `BattleSide null` No
attackerScore `number null` No
defenderScore `number null` No
isActive `boolean null` No
isSystemResistance `boolean null` No
isBigBattle `boolean null` No
winner_country `string null` No
startTime `string null` No
endTime `string null` No
currentRound `string integer object
rounds `array[string] null` No
roundsHistory `array[any] null` No
roundsToWin `integer null` No
totalRounds `integer null` No
type `string null` No
stats `BattleStats null` No
createdAt `string null` No
updatedAt `string null` No

BattleSide

Per-side summary (attacker/defender) of a battle.

Field Type Required Description
_id `string null` No
__v `integer null` No
country `string null` No
region `string null` No
damages `number null` No
hitCount `integer null` No
wonRoundsCount `integer null` No
countryOrders `array[string] null` No
muOrders `array[string] null` No
moneyPool `number null` No
moneyPer1kDamages `number null` No
bountyEffectiveAt `string null` No

BattleStats

Field Type Required Description
_id `string null` No
__v `integer null` No
hitCount `integer null` No

Region

Field Type Required Description
_id `string null` No
__v `integer null` No
name `string null` No
code `string null` No
mainCity `string null` No
country `string null` No
countryCode `string null` No
initialCountry `string null` No
isCapital `boolean null` No
isLinkedToCapital `boolean null` No
hasCoast `boolean null` No
biome `string null` No
climate `string null` No
position `array[number] null` No
neighbors `array[string] null` No
development `number null` No
baseDevelopment `number null` No
currentPopulation `integer null` No
resistance `number null` No
resistanceMax `number null` No
strategicResource `string null` No
deposit `RegionDeposit null` No
stats `RegionStats null` No
dates `RegionDates null` No
activeUpgradeLevels `RegionActiveUpgradeLevels null` No
upgradesV2 `RegionUpgradesV2 null` No
activeBattle `Battle null` No
lastBattleEndedAt `string null` No
lastResistanceContributionAt `string null` No
lastRevoltEndedAt `string null` No

RegionActiveUpgradeLevels

Field Type Required Description
_id `string null` No
__v `integer null` No
base `integer null` No
bunker `integer null` No
pacificationCenter `integer null` No

RegionDates

Field Type Required Description
_id `string null` No
__v `integer null` No
lastOwnershipChangeAt `string null` No

RegionDeposit

Field Type Required Description
_id `string null` No
__v `integer null` No
type `string null` No
bonusPercent `number null` No
startsAt `string null` No
endsAt `string null` No

RegionStats

Field Type Required Description
_id `string null` No
__v `integer null` No
investedMoney `number null` No

RegionUpgrade

State of a single region upgrade (base, bunker, ...).

Field Type Required Description
_id `string null` No
__v `integer null` No
level `integer null` No
status `string null` No
statusChangedAt `string null` No
constructionPoints `number null` No
investedMoney `number null` No
isUnderConstruction `boolean null` No
constructionStartedAt `string null` No
constructionEndedAt `string null` No
lastConstructions `array[RegionUpgradeConstruction] null` No

RegionUpgradeConstruction

One contribution entry in an upgrade's construction history.

Field Type Required Description
_id `string null` No
__v `integer null` No
construction `number null` No
constructionAt `string null` No
user `string null` No

RegionUpgradesV2

Field Type Required Description
_id `string null` No
__v `integer null` No
upgrades `object null` No
activeConstructionCount `integer null` No

.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 null` No
__v `integer null` No
war `string null` No
region `string null` No
attacker_country_id `string null` No
defender_country_id `string null` No
attacker `BattleSide null` No
defender `BattleSide null` No
attackerScore `number null` No
defenderScore `number null` No
isActive `boolean null` No
isSystemResistance `boolean null` No
isBigBattle `boolean null` No
winner_country `string null` No
startTime `string null` No
endTime `string null` No
currentRound `string integer object
rounds `array[string] null` No
roundsHistory `array[any] null` No
roundsToWin `integer null` No
totalRounds `integer null` No
type `string null` No
stats `BattleStats null` No
createdAt `string null` No
updatedAt `string null` No

BattleSide

Per-side summary (attacker/defender) of a battle.

Field Type Required Description
_id `string null` No
__v `integer null` No
country `string null` No
region `string null` No
damages `number null` No
hitCount `integer null` No
wonRoundsCount `integer null` No
countryOrders `array[string] null` No
muOrders `array[string] null` No
moneyPool `number null` No
moneyPer1kDamages `number null` No
bountyEffectiveAt `string null` No

BattleStats

Field Type Required Description
_id `string null` No
__v `integer null` No
hitCount `integer null` No

Region

Field Type Required Description
_id `string null` No
__v `integer null` No
name `string null` No
code `string null` No
mainCity `string null` No
country `string null` No
countryCode `string null` No
initialCountry `string null` No
isCapital `boolean null` No
isLinkedToCapital `boolean null` No
hasCoast `boolean null` No
biome `string null` No
climate `string null` No
position `array[number] null` No
neighbors `array[string] null` No
development `number null` No
baseDevelopment `number null` No
currentPopulation `integer null` No
resistance `number null` No
resistanceMax `number null` No
strategicResource `string null` No
deposit `RegionDeposit null` No
stats `RegionStats null` No
dates `RegionDates null` No
activeUpgradeLevels `RegionActiveUpgradeLevels null` No
upgradesV2 `RegionUpgradesV2 null` No
activeBattle `Battle null` No
lastBattleEndedAt `string null` No
lastResistanceContributionAt `string null` No
lastRevoltEndedAt `string null` No

RegionActiveUpgradeLevels

Field Type Required Description
_id `string null` No
__v `integer null` No
base `integer null` No
bunker `integer null` No
pacificationCenter `integer null` No

RegionDates

Field Type Required Description
_id `string null` No
__v `integer null` No
lastOwnershipChangeAt `string null` No

RegionDeposit

Field Type Required Description
_id `string null` No
__v `integer null` No
type `string null` No
bonusPercent `number null` No
startsAt `string null` No
endsAt `string null` No

RegionStats

Field Type Required Description
_id `string null` No
__v `integer null` No
investedMoney `number null` No

RegionUpgrade

State of a single region upgrade (base, bunker, ...).

Field Type Required Description
_id `string null` No
__v `integer null` No
level `integer null` No
status `string null` No
statusChangedAt `string null` No
constructionPoints `number null` No
investedMoney `number null` No
isUnderConstruction `boolean null` No
constructionStartedAt `string null` No
constructionEndedAt `string null` No
lastConstructions `array[RegionUpgradeConstruction] null` No

RegionUpgradeConstruction

One contribution entry in an upgrade's construction history.

Field Type Required Description
_id `string null` No
__v `integer null` No
construction `number null` No
constructionAt `string null` No
user `string null` No

RegionUpgradesV2

Field Type Required Description
_id `string null` No
__v `integer null` No
upgrades `object null` No
activeConstructionCount `integer null` No

.invalidate_cache()

Clear the SWR cache for all resources.

Signature

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

Clone this wiki locally