-
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 |
Optional | |
__v |
integer |
Optional | |
name |
string |
Optional | The official name of the country. |
code |
string |
Optional | The code. |
money |
number |
Optional | The money. |
scheme |
string |
Optional | The scheme. |
mapAccent |
string |
Optional | The map accent. |
discordUrl |
string |
Optional | The discord url. |
specializedItem |
string |
Optional | The specialized item. |
pinnedArticle |
string |
Optional | The pinned article. |
currentBattleOrder |
string |
Optional | The current battle order. |
rulingParty |
string |
Optional | The ruling party. |
allianceId |
string |
Optional | The alliance id. |
enemy |
string |
Optional | The enemy. |
allies |
array[string] |
Optional | A list of country UUIDs that share a Mutual Protection Pact (MPP) with this country. |
warsWith |
array[string] |
Optional | A list of country UUIDs this country is currently at war with. |
defensivePacts |
array[string] |
Optional | A list of country UUIDs offering defensive guarantees. |
orgs |
array[string] |
Optional | The orgs. |
nonAggressionUntil |
object |
Optional | The non aggression until. |
development |
number |
Optional | The development. |
currentDevelopment |
number |
Optional | The current development. |
averageDevelopment |
number |
Optional | The average development. |
coreDevelopment |
number |
Optional | The core development. |
currentPopulation |
integer |
Optional | The current population. |
taxes |
CountryTaxes |
Optional | The various tax rates applied to economic activities within the country. |
unrest |
CountryUnrest |
Optional | The unrest. |
strategicResources |
CountryStrategicResources |
Optional | The strategic resources. |
rankings |
CountryRankings |
Optional | The country's current standing in the global leaderboards. |
createdAt |
string |
Optional | The timestamp when this record was created. |
updatedAt |
string |
Optional | The timestamp when this record was last modified. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
countryRegionDiff |
RankingDetail |
Optional | The country region diff. |
countryDamages |
RankingDetail |
Optional | The country damages. |
weeklyCountryDamages |
RankingDetail |
Optional | The weekly country damages. |
weeklyCountryDamagesPerCitizen |
RankingDetail |
Optional | The weekly country damages per citizen. |
countryDevelopment |
RankingDetail |
Optional | The country development. |
countryActivePopulation |
RankingDetail |
Optional | The country active population. |
countryWealth |
RankingDetail |
Optional | The country wealth. |
countryBounty |
RankingDetail |
Optional | The country bounty. |
countryProductionBonus |
RankingDetail |
Optional | The country production bonus. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
productionPercent |
number |
Optional | The production percent. |
developmentPercent |
number |
Optional | The development percent. |
Region IDs holding each strategic resource.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
coal |
array[string] |
Optional | The coal. |
diamonds |
array[string] |
Optional | The diamonds. |
gold |
array[string] |
Optional | The gold. |
lithium |
array[string] |
Optional | The lithium. |
rareEarths |
array[string] |
Optional | The rare earths. |
uranium |
array[string] |
Optional | The uranium. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
resources |
CountryStrategicResourceMap |
Optional | The resources. |
bonuses |
CountryStrategicBonuses |
Optional | The bonuses. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
income |
number |
Optional | The income. |
market |
number |
Optional | The market. |
selfWork |
number |
Optional | The tax rate applied when a user works for their own companies. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
bar |
number |
Optional | The bar. |
barMax |
number |
Optional | The bar max. |
lastContributionAt |
string |
Optional | The timestamp of the last contribution event. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
value |
number |
Optional | The value. |
rank |
integer |
Optional | The rank. |
tier |
string |
Optional | The tier. |
country |
string |
Optional | The UUID of the country this user holds citizenship in. |
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 |
Optional | |
__v |
integer |
Optional | |
name |
string |
Optional | The official name of the country. |
code |
string |
Optional | The code. |
money |
number |
Optional | The money. |
scheme |
string |
Optional | The scheme. |
mapAccent |
string |
Optional | The map accent. |
discordUrl |
string |
Optional | The discord url. |
specializedItem |
string |
Optional | The specialized item. |
pinnedArticle |
string |
Optional | The pinned article. |
currentBattleOrder |
string |
Optional | The current battle order. |
rulingParty |
string |
Optional | The ruling party. |
allianceId |
string |
Optional | The alliance id. |
enemy |
string |
Optional | The enemy. |
allies |
array[string] |
Optional | A list of country UUIDs that share a Mutual Protection Pact (MPP) with this country. |
warsWith |
array[string] |
Optional | A list of country UUIDs this country is currently at war with. |
defensivePacts |
array[string] |
Optional | A list of country UUIDs offering defensive guarantees. |
orgs |
array[string] |
Optional | The orgs. |
nonAggressionUntil |
object |
Optional | The non aggression until. |
development |
number |
Optional | The development. |
currentDevelopment |
number |
Optional | The current development. |
averageDevelopment |
number |
Optional | The average development. |
coreDevelopment |
number |
Optional | The core development. |
currentPopulation |
integer |
Optional | The current population. |
taxes |
CountryTaxes |
Optional | The various tax rates applied to economic activities within the country. |
unrest |
CountryUnrest |
Optional | The unrest. |
strategicResources |
CountryStrategicResources |
Optional | The strategic resources. |
rankings |
CountryRankings |
Optional | The country's current standing in the global leaderboards. |
createdAt |
string |
Optional | The timestamp when this record was created. |
updatedAt |
string |
Optional | The timestamp when this record was last modified. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
countryRegionDiff |
RankingDetail |
Optional | The country region diff. |
countryDamages |
RankingDetail |
Optional | The country damages. |
weeklyCountryDamages |
RankingDetail |
Optional | The weekly country damages. |
weeklyCountryDamagesPerCitizen |
RankingDetail |
Optional | The weekly country damages per citizen. |
countryDevelopment |
RankingDetail |
Optional | The country development. |
countryActivePopulation |
RankingDetail |
Optional | The country active population. |
countryWealth |
RankingDetail |
Optional | The country wealth. |
countryBounty |
RankingDetail |
Optional | The country bounty. |
countryProductionBonus |
RankingDetail |
Optional | The country production bonus. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
productionPercent |
number |
Optional | The production percent. |
developmentPercent |
number |
Optional | The development percent. |
Region IDs holding each strategic resource.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
coal |
array[string] |
Optional | The coal. |
diamonds |
array[string] |
Optional | The diamonds. |
gold |
array[string] |
Optional | The gold. |
lithium |
array[string] |
Optional | The lithium. |
rareEarths |
array[string] |
Optional | The rare earths. |
uranium |
array[string] |
Optional | The uranium. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
resources |
CountryStrategicResourceMap |
Optional | The resources. |
bonuses |
CountryStrategicBonuses |
Optional | The bonuses. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
income |
number |
Optional | The income. |
market |
number |
Optional | The market. |
selfWork |
number |
Optional | The tax rate applied when a user works for their own companies. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
bar |
number |
Optional | The bar. |
barMax |
number |
Optional | The bar max. |
lastContributionAt |
string |
Optional | The timestamp of the last contribution event. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
value |
number |
Optional | The value. |
rank |
integer |
Optional | The rank. |
tier |
string |
Optional | The tier. |
country |
string |
Optional | The UUID of the country this user holds citizenship in. |
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 |
Optional | |
__v |
integer |
Optional | |
name |
string |
Optional | The official name of the country. |
code |
string |
Optional | The code. |
money |
number |
Optional | The money. |
scheme |
string |
Optional | The scheme. |
mapAccent |
string |
Optional | The map accent. |
discordUrl |
string |
Optional | The discord url. |
specializedItem |
string |
Optional | The specialized item. |
pinnedArticle |
string |
Optional | The pinned article. |
currentBattleOrder |
string |
Optional | The current battle order. |
rulingParty |
string |
Optional | The ruling party. |
allianceId |
string |
Optional | The alliance id. |
enemy |
string |
Optional | The enemy. |
allies |
array[string] |
Optional | A list of country UUIDs that share a Mutual Protection Pact (MPP) with this country. |
warsWith |
array[string] |
Optional | A list of country UUIDs this country is currently at war with. |
defensivePacts |
array[string] |
Optional | A list of country UUIDs offering defensive guarantees. |
orgs |
array[string] |
Optional | The orgs. |
nonAggressionUntil |
object |
Optional | The non aggression until. |
development |
number |
Optional | The development. |
currentDevelopment |
number |
Optional | The current development. |
averageDevelopment |
number |
Optional | The average development. |
coreDevelopment |
number |
Optional | The core development. |
currentPopulation |
integer |
Optional | The current population. |
taxes |
CountryTaxes |
Optional | The various tax rates applied to economic activities within the country. |
unrest |
CountryUnrest |
Optional | The unrest. |
strategicResources |
CountryStrategicResources |
Optional | The strategic resources. |
rankings |
CountryRankings |
Optional | The country's current standing in the global leaderboards. |
createdAt |
string |
Optional | The timestamp when this record was created. |
updatedAt |
string |
Optional | The timestamp when this record was last modified. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
countryRegionDiff |
RankingDetail |
Optional | The country region diff. |
countryDamages |
RankingDetail |
Optional | The country damages. |
weeklyCountryDamages |
RankingDetail |
Optional | The weekly country damages. |
weeklyCountryDamagesPerCitizen |
RankingDetail |
Optional | The weekly country damages per citizen. |
countryDevelopment |
RankingDetail |
Optional | The country development. |
countryActivePopulation |
RankingDetail |
Optional | The country active population. |
countryWealth |
RankingDetail |
Optional | The country wealth. |
countryBounty |
RankingDetail |
Optional | The country bounty. |
countryProductionBonus |
RankingDetail |
Optional | The country production bonus. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
productionPercent |
number |
Optional | The production percent. |
developmentPercent |
number |
Optional | The development percent. |
Region IDs holding each strategic resource.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
coal |
array[string] |
Optional | The coal. |
diamonds |
array[string] |
Optional | The diamonds. |
gold |
array[string] |
Optional | The gold. |
lithium |
array[string] |
Optional | The lithium. |
rareEarths |
array[string] |
Optional | The rare earths. |
uranium |
array[string] |
Optional | The uranium. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
resources |
CountryStrategicResourceMap |
Optional | The resources. |
bonuses |
CountryStrategicBonuses |
Optional | The bonuses. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
income |
number |
Optional | The income. |
market |
number |
Optional | The market. |
selfWork |
number |
Optional | The tax rate applied when a user works for their own companies. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
bar |
number |
Optional | The bar. |
barMax |
number |
Optional | The bar max. |
lastContributionAt |
string |
Optional | The timestamp of the last contribution event. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
value |
number |
Optional | The value. |
rank |
integer |
Optional | The rank. |
tier |
string |
Optional | The tier. |
country |
string |
Optional | The UUID of the country this user holds citizenship in. |
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