-
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 |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
name |
string |
Optional |
code |
string |
Optional |
money |
number |
Optional |
scheme |
string |
Optional |
mapAccent |
string |
Optional |
discordUrl |
string |
Optional |
specializedItem |
string |
Optional |
pinnedArticle |
string |
Optional |
currentBattleOrder |
string |
Optional |
rulingParty |
string |
Optional |
allianceId |
string |
Optional |
enemy |
string |
Optional |
allies |
array[string] |
Optional |
warsWith |
array[string] |
Optional |
defensivePacts |
array[string] |
Optional |
orgs |
array[string] |
Optional |
nonAggressionUntil |
object |
Optional |
development |
number |
Optional |
currentDevelopment |
number |
Optional |
averageDevelopment |
number |
Optional |
coreDevelopment |
number |
Optional |
currentPopulation |
integer |
Optional |
taxes |
CountryTaxes |
Optional |
unrest |
CountryUnrest |
Optional |
strategicResources |
CountryStrategicResources |
Optional |
rankings |
CountryRankings |
Optional |
createdAt |
string |
Optional |
updatedAt |
string |
Optional |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
countryRegionDiff |
RankingDetail |
Optional |
countryDamages |
RankingDetail |
Optional |
weeklyCountryDamages |
RankingDetail |
Optional |
weeklyCountryDamagesPerCitizen |
RankingDetail |
Optional |
countryDevelopment |
RankingDetail |
Optional |
countryActivePopulation |
RankingDetail |
Optional |
countryWealth |
RankingDetail |
Optional |
countryBounty |
RankingDetail |
Optional |
countryProductionBonus |
RankingDetail |
Optional |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
productionPercent |
number |
Optional |
developmentPercent |
number |
Optional |
Region IDs holding each strategic resource.
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
coal |
array[string] |
Optional |
diamonds |
array[string] |
Optional |
gold |
array[string] |
Optional |
lithium |
array[string] |
Optional |
rareEarths |
array[string] |
Optional |
uranium |
array[string] |
Optional |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
resources |
CountryStrategicResourceMap |
Optional |
bonuses |
CountryStrategicBonuses |
Optional |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
income |
number |
Optional |
market |
number |
Optional |
selfWork |
number |
Optional |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
bar |
number |
Optional |
barMax |
number |
Optional |
lastContributionAt |
string |
Optional |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
value |
number |
Optional |
rank |
integer |
Optional |
tier |
string |
Optional |
country |
string |
Optional |
Get a single country by ID.
await client.country.get(country_id: 'str') -> 'Country'| Name | Type | Default |
|---|---|---|
country_id |
str |
Required |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
name |
string |
Optional |
code |
string |
Optional |
money |
number |
Optional |
scheme |
string |
Optional |
mapAccent |
string |
Optional |
discordUrl |
string |
Optional |
specializedItem |
string |
Optional |
pinnedArticle |
string |
Optional |
currentBattleOrder |
string |
Optional |
rulingParty |
string |
Optional |
allianceId |
string |
Optional |
enemy |
string |
Optional |
allies |
array[string] |
Optional |
warsWith |
array[string] |
Optional |
defensivePacts |
array[string] |
Optional |
orgs |
array[string] |
Optional |
nonAggressionUntil |
object |
Optional |
development |
number |
Optional |
currentDevelopment |
number |
Optional |
averageDevelopment |
number |
Optional |
coreDevelopment |
number |
Optional |
currentPopulation |
integer |
Optional |
taxes |
CountryTaxes |
Optional |
unrest |
CountryUnrest |
Optional |
strategicResources |
CountryStrategicResources |
Optional |
rankings |
CountryRankings |
Optional |
createdAt |
string |
Optional |
updatedAt |
string |
Optional |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
countryRegionDiff |
RankingDetail |
Optional |
countryDamages |
RankingDetail |
Optional |
weeklyCountryDamages |
RankingDetail |
Optional |
weeklyCountryDamagesPerCitizen |
RankingDetail |
Optional |
countryDevelopment |
RankingDetail |
Optional |
countryActivePopulation |
RankingDetail |
Optional |
countryWealth |
RankingDetail |
Optional |
countryBounty |
RankingDetail |
Optional |
countryProductionBonus |
RankingDetail |
Optional |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
productionPercent |
number |
Optional |
developmentPercent |
number |
Optional |
Region IDs holding each strategic resource.
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
coal |
array[string] |
Optional |
diamonds |
array[string] |
Optional |
gold |
array[string] |
Optional |
lithium |
array[string] |
Optional |
rareEarths |
array[string] |
Optional |
uranium |
array[string] |
Optional |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
resources |
CountryStrategicResourceMap |
Optional |
bonuses |
CountryStrategicBonuses |
Optional |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
income |
number |
Optional |
market |
number |
Optional |
selfWork |
number |
Optional |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
bar |
number |
Optional |
barMax |
number |
Optional |
lastContributionAt |
string |
Optional |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
value |
number |
Optional |
rank |
integer |
Optional |
tier |
string |
Optional |
country |
string |
Optional |
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 |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
name |
string |
Optional |
code |
string |
Optional |
money |
number |
Optional |
scheme |
string |
Optional |
mapAccent |
string |
Optional |
discordUrl |
string |
Optional |
specializedItem |
string |
Optional |
pinnedArticle |
string |
Optional |
currentBattleOrder |
string |
Optional |
rulingParty |
string |
Optional |
allianceId |
string |
Optional |
enemy |
string |
Optional |
allies |
array[string] |
Optional |
warsWith |
array[string] |
Optional |
defensivePacts |
array[string] |
Optional |
orgs |
array[string] |
Optional |
nonAggressionUntil |
object |
Optional |
development |
number |
Optional |
currentDevelopment |
number |
Optional |
averageDevelopment |
number |
Optional |
coreDevelopment |
number |
Optional |
currentPopulation |
integer |
Optional |
taxes |
CountryTaxes |
Optional |
unrest |
CountryUnrest |
Optional |
strategicResources |
CountryStrategicResources |
Optional |
rankings |
CountryRankings |
Optional |
createdAt |
string |
Optional |
updatedAt |
string |
Optional |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
countryRegionDiff |
RankingDetail |
Optional |
countryDamages |
RankingDetail |
Optional |
weeklyCountryDamages |
RankingDetail |
Optional |
weeklyCountryDamagesPerCitizen |
RankingDetail |
Optional |
countryDevelopment |
RankingDetail |
Optional |
countryActivePopulation |
RankingDetail |
Optional |
countryWealth |
RankingDetail |
Optional |
countryBounty |
RankingDetail |
Optional |
countryProductionBonus |
RankingDetail |
Optional |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
productionPercent |
number |
Optional |
developmentPercent |
number |
Optional |
Region IDs holding each strategic resource.
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
coal |
array[string] |
Optional |
diamonds |
array[string] |
Optional |
gold |
array[string] |
Optional |
lithium |
array[string] |
Optional |
rareEarths |
array[string] |
Optional |
uranium |
array[string] |
Optional |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
resources |
CountryStrategicResourceMap |
Optional |
bonuses |
CountryStrategicBonuses |
Optional |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
income |
number |
Optional |
market |
number |
Optional |
selfWork |
number |
Optional |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
bar |
number |
Optional |
barMax |
number |
Optional |
lastContributionAt |
string |
Optional |
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
value |
number |
Optional |
rank |
integer |
Optional |
tier |
string |
Optional |
country |
string |
Optional |
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