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