-
Notifications
You must be signed in to change notification settings - Fork 2
Resource PartyResource
CrucifiedPain edited this page Jun 26, 2026
·
10 revisions
Endpoints: • party.getById • party.getManyPaginated (cursor-paginated)
Fetch all items across all pages concurrently using parallel time-slicing.
await client.party.collect_all(**kwargs: 'typing.Any') -> 'list[Party]'| Name | Type | Default |
|---|---|---|
kwargs |
Any |
*Required* |
A political party in WarEra.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
name |
string |
Optional | The official name of the country. |
description |
string |
Optional | The description. |
country |
string |
Optional | |
region |
string |
Optional | |
leader |
string |
Optional | |
councilMembers |
array[string] |
Optional | The council members. |
members |
array[string] |
Optional | The members. |
ethics |
PartyEthics |
Optional | The ethics. |
avatarUrl |
string |
Optional | The CDN URL pointing to the user's profile picture. |
treasurer |
string |
Optional | The treasurer. |
primaryWinner |
string |
Optional | The primary winner. |
createdAt |
string |
Optional | The timestamp when this record was created. |
updatedAt |
string |
Optional | The timestamp when this record was last modified. |
Ethics alignment values for a political party.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
unethical |
boolean |
Optional | The unethical. |
militarism |
number |
Optional | The militarism. |
isolationism |
number |
Optional | The isolationism. |
imperialism |
number |
Optional | The imperialism. |
industrialism |
number |
Optional | The industrialism. |
Get a single political party by ID.
await client.party.get(party_id: 'str') -> 'Party'| Name | Type | Default |
|---|---|---|
party_id |
str |
*Required* |
A political party in WarEra.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
name |
string |
Optional | The official name of the country. |
description |
string |
Optional | The description. |
country |
string |
Optional | |
region |
string |
Optional | |
leader |
string |
Optional | |
councilMembers |
array[string] |
Optional | The council members. |
members |
array[string] |
Optional | The members. |
ethics |
PartyEthics |
Optional | The ethics. |
avatarUrl |
string |
Optional | The CDN URL pointing to the user's profile picture. |
treasurer |
string |
Optional | The treasurer. |
primaryWinner |
string |
Optional | The primary winner. |
createdAt |
string |
Optional | The timestamp when this record was created. |
updatedAt |
string |
Optional | The timestamp when this record was last modified. |
Ethics alignment values for a political party.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
unethical |
boolean |
Optional | The unethical. |
militarism |
number |
Optional | The militarism. |
isolationism |
number |
Optional | The isolationism. |
imperialism |
number |
Optional | The imperialism. |
industrialism |
number |
Optional | The industrialism. |
Convenience: fetch all parties in a given country.
await client.party.get_by_country(country_id: 'str') -> 'list[Party]'| Name | Type | Default |
|---|---|---|
country_id |
str |
*Required* |
A political party in WarEra.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
name |
string |
Optional | The official name of the country. |
description |
string |
Optional | The description. |
country |
string |
Optional | |
region |
string |
Optional | |
leader |
string |
Optional | |
councilMembers |
array[string] |
Optional | The council members. |
members |
array[string] |
Optional | The members. |
ethics |
PartyEthics |
Optional | The ethics. |
avatarUrl |
string |
Optional | The CDN URL pointing to the user's profile picture. |
treasurer |
string |
Optional | The treasurer. |
primaryWinner |
string |
Optional | The primary winner. |
createdAt |
string |
Optional | The timestamp when this record was created. |
updatedAt |
string |
Optional | The timestamp when this record was last modified. |
Ethics alignment values for a political party.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
unethical |
boolean |
Optional | The unethical. |
militarism |
number |
Optional | The militarism. |
isolationism |
number |
Optional | The isolationism. |
imperialism |
number |
Optional | The imperialism. |
industrialism |
number |
Optional | The industrialism. |
Get political parties (cursor-paginated), optionally filtered by country.
Args:
country_id: Filter to parties in this country.
direction: "forward" (default) or "backward" pagination.
await client.party.get_paginated(*, country_id: 'str | None' = None, limit: 'int' = 20, cursor: 'str | None' = None, direction: 'str | None' = None, auto_items: 'bool' = False, max_pages: 'int | float' = inf, cursor_end: 'str | None' = None) -> 'CursorPage[Party] | AsyncIterator[Party]'| Name | Type | Default |
|---|---|---|
country_id |
str |
None |
limit |
int |
20 |
cursor |
str |
None |
direction |
str |
None |
auto_items |
bool |
False |
max_pages |
int | float |
inf |
cursor_end |
str |
None |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
items |
array[Party] |
Required | |
nextCursor |
string |
Optional | |
hasMore |
boolean |
Optional |
A political party in WarEra.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
name |
string |
Optional | The official name of the country. |
description |
string |
Optional | The description. |
country |
string |
Optional | |
region |
string |
Optional | |
leader |
string |
Optional | |
councilMembers |
array[string] |
Optional | The council members. |
members |
array[string] |
Optional | The members. |
ethics |
PartyEthics |
Optional | The ethics. |
avatarUrl |
string |
Optional | The CDN URL pointing to the user's profile picture. |
treasurer |
string |
Optional | The treasurer. |
primaryWinner |
string |
Optional | The primary winner. |
createdAt |
string |
Optional | The timestamp when this record was created. |
updatedAt |
string |
Optional | The timestamp when this record was last modified. |
Ethics alignment values for a political party.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
unethical |
boolean |
Optional | The unethical. |
militarism |
number |
Optional | The militarism. |
isolationism |
number |
Optional | The isolationism. |
imperialism |
number |
Optional | The imperialism. |
industrialism |
number |
Optional | The industrialism. |
Clear the SWR cache for all resources.
await client.party.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