-
Notifications
You must be signed in to change notification settings - Fork 2
Resource CountryResource
CrucifiedPain edited this page Jun 26, 2026
·
9 revisions
Endpoints: • country.getCountryById • country.getAllCountries
Client-side helper: return the country matching name (case-insensitive).
Returns None if no country with that name exists.
await client.country.find_by_name(name: 'str') -> 'Country | None'| Name | Type | Default |
|---|---|---|
name |
str |
*Required* |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
name |
`string | null` | No |
code |
`string | null` | No |
money |
`number | null` | No |
scheme |
`string | null` | No |
mapAccent |
`string | null` | No |
discordUrl |
`string | null` | No |
specializedItem |
`string | null` | No |
pinnedArticle |
`string | null` | No |
currentBattleOrder |
`string | null` | No |
rulingParty |
`string | null` | No |
allianceId |
`string | null` | No |
enemy |
`string | null` | No |
allies |
`array | null` | No |
warsWith |
`array | null` | No |
defensivePacts |
`array | null` | No |
orgs |
`array | null` | No |
nonAggressionUntil |
`object | null` | No |
development |
`number | null` | No |
currentDevelopment |
`number | null` | No |
averageDevelopment |
`number | null` | No |
coreDevelopment |
`number | null` | No |
currentPopulation |
`integer | null` | No |
taxes |
`CountryTaxes | null` | No |
unrest |
`CountryUnrest | null` | No |
strategicResources |
`CountryStrategicResources | null` | No |
rankings |
`CountryRankings | null` | No |
createdAt |
`string | null` | No |
updatedAt |
`string | null` | No |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
countryRegionDiff |
`RankingDetail | null` | No |
countryDamages |
`RankingDetail | null` | No |
weeklyCountryDamages |
`RankingDetail | null` | No |
weeklyCountryDamagesPerCitizen |
`RankingDetail | null` | No |
countryDevelopment |
`RankingDetail | null` | No |
countryActivePopulation |
`RankingDetail | null` | No |
countryWealth |
`RankingDetail | null` | No |
countryBounty |
`RankingDetail | null` | No |
countryProductionBonus |
`RankingDetail | null` | No |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
productionPercent |
`number | null` | No |
developmentPercent |
`number | null` | No |
Region IDs holding each strategic resource.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
coal |
`array | null` | No |
diamonds |
`array | null` | No |
gold |
`array | null` | No |
lithium |
`array | null` | No |
rareEarths |
`array | null` | No |
uranium |
`array | null` | No |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
resources |
`CountryStrategicResourceMap | null` | No |
bonuses |
`CountryStrategicBonuses | null` | No |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
income |
`number | null` | No |
market |
`number | null` | No |
selfWork |
`number | null` | No |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
bar |
`number | null` | No |
barMax |
`number | null` | No |
lastContributionAt |
`string | null` | No |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
value |
`number | null` | No |
rank |
`integer | null` | No |
tier |
`string | null` | No |
country |
`string | null` | No |
Get a single country by ID.
await client.country.get(country_id: 'str') -> 'Country'| Name | Type | Default |
|---|---|---|
country_id |
str |
*Required* |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
name |
`string | null` | No |
code |
`string | null` | No |
money |
`number | null` | No |
scheme |
`string | null` | No |
mapAccent |
`string | null` | No |
discordUrl |
`string | null` | No |
specializedItem |
`string | null` | No |
pinnedArticle |
`string | null` | No |
currentBattleOrder |
`string | null` | No |
rulingParty |
`string | null` | No |
allianceId |
`string | null` | No |
enemy |
`string | null` | No |
allies |
`array | null` | No |
warsWith |
`array | null` | No |
defensivePacts |
`array | null` | No |
orgs |
`array | null` | No |
nonAggressionUntil |
`object | null` | No |
development |
`number | null` | No |
currentDevelopment |
`number | null` | No |
averageDevelopment |
`number | null` | No |
coreDevelopment |
`number | null` | No |
currentPopulation |
`integer | null` | No |
taxes |
`CountryTaxes | null` | No |
unrest |
`CountryUnrest | null` | No |
strategicResources |
`CountryStrategicResources | null` | No |
rankings |
`CountryRankings | null` | No |
createdAt |
`string | null` | No |
updatedAt |
`string | null` | No |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
countryRegionDiff |
`RankingDetail | null` | No |
countryDamages |
`RankingDetail | null` | No |
weeklyCountryDamages |
`RankingDetail | null` | No |
weeklyCountryDamagesPerCitizen |
`RankingDetail | null` | No |
countryDevelopment |
`RankingDetail | null` | No |
countryActivePopulation |
`RankingDetail | null` | No |
countryWealth |
`RankingDetail | null` | No |
countryBounty |
`RankingDetail | null` | No |
countryProductionBonus |
`RankingDetail | null` | No |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
productionPercent |
`number | null` | No |
developmentPercent |
`number | null` | No |
Region IDs holding each strategic resource.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
coal |
`array | null` | No |
diamonds |
`array | null` | No |
gold |
`array | null` | No |
lithium |
`array | null` | No |
rareEarths |
`array | null` | No |
uranium |
`array | null` | No |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
resources |
`CountryStrategicResourceMap | null` | No |
bonuses |
`CountryStrategicBonuses | null` | No |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
income |
`number | null` | No |
market |
`number | null` | No |
selfWork |
`number | null` | No |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
bar |
`number | null` | No |
barMax |
`number | null` | No |
lastContributionAt |
`string | null` | No |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
value |
`number | null` | No |
rank |
`integer | null` | No |
tier |
`string | null` | No |
country |
`string | null` | No |
Get all countries. Returns a dict keyed by country ID for O(1) lookups.
await client.country.get_all() -> 'dict[str, Country]'| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
name |
`string | null` | No |
code |
`string | null` | No |
money |
`number | null` | No |
scheme |
`string | null` | No |
mapAccent |
`string | null` | No |
discordUrl |
`string | null` | No |
specializedItem |
`string | null` | No |
pinnedArticle |
`string | null` | No |
currentBattleOrder |
`string | null` | No |
rulingParty |
`string | null` | No |
allianceId |
`string | null` | No |
enemy |
`string | null` | No |
allies |
`array | null` | No |
warsWith |
`array | null` | No |
defensivePacts |
`array | null` | No |
orgs |
`array | null` | No |
nonAggressionUntil |
`object | null` | No |
development |
`number | null` | No |
currentDevelopment |
`number | null` | No |
averageDevelopment |
`number | null` | No |
coreDevelopment |
`number | null` | No |
currentPopulation |
`integer | null` | No |
taxes |
`CountryTaxes | null` | No |
unrest |
`CountryUnrest | null` | No |
strategicResources |
`CountryStrategicResources | null` | No |
rankings |
`CountryRankings | null` | No |
createdAt |
`string | null` | No |
updatedAt |
`string | null` | No |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
countryRegionDiff |
`RankingDetail | null` | No |
countryDamages |
`RankingDetail | null` | No |
weeklyCountryDamages |
`RankingDetail | null` | No |
weeklyCountryDamagesPerCitizen |
`RankingDetail | null` | No |
countryDevelopment |
`RankingDetail | null` | No |
countryActivePopulation |
`RankingDetail | null` | No |
countryWealth |
`RankingDetail | null` | No |
countryBounty |
`RankingDetail | null` | No |
countryProductionBonus |
`RankingDetail | null` | No |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
productionPercent |
`number | null` | No |
developmentPercent |
`number | null` | No |
Region IDs holding each strategic resource.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
coal |
`array | null` | No |
diamonds |
`array | null` | No |
gold |
`array | null` | No |
lithium |
`array | null` | No |
rareEarths |
`array | null` | No |
uranium |
`array | null` | No |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
resources |
`CountryStrategicResourceMap | null` | No |
bonuses |
`CountryStrategicBonuses | null` | No |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
income |
`number | null` | No |
market |
`number | null` | No |
selfWork |
`number | null` | No |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
bar |
`number | null` | No |
barMax |
`number | null` | No |
lastContributionAt |
`string | null` | No |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
value |
`number | null` | No |
rank |
`integer | null` | No |
tier |
`string | null` | No |
country |
`string | null` | No |
Clear the SWR cache for all resources.
await client.country.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