-
Notifications
You must be signed in to change notification settings - Fork 2
Resource ElectionResource
CrucifiedPain edited this page Jun 26, 2026
·
10 revisions
Endpoints: • election.getElections (cursor-paginated)
Fetch all items across all pages concurrently using parallel time-slicing.
await client.election.collect_all(**kwargs: 'typing.Any') -> 'list[Election]'| Name | Type | Default |
|---|---|---|
kwargs |
Any |
*Required* |
An election event in a country.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
country |
`string | null` | No |
electedCandidates |
`array | null` | No |
isActive |
`boolean | null` | No |
type |
`string | null` | No |
candidates |
`array | null` | No |
votesStartAt |
`string | null` | No |
votesEndAt |
`string | null` | No |
votesCount |
`integer | null` | No |
electedCount |
`integer | null` | No |
createdAt |
`string | null` | No |
status |
`string | null` | No |
votes |
`object | null` | No |
A candidate in an election.
| Field | Type | Required | Description |
|---|---|---|---|
user |
`string | null` | No |
voteCount |
`integer | null` | No |
article |
`string | null` | No |
party |
`string | null` | No |
isElected |
`boolean | null` | No |
Convenience: fetch all elections in a given country.
await client.election.get_by_country(country_id: 'str') -> 'list[Election]'| Name | Type | Default |
|---|---|---|
country_id |
str |
*Required* |
An election event in a country.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
country |
`string | null` | No |
electedCandidates |
`array | null` | No |
isActive |
`boolean | null` | No |
type |
`string | null` | No |
candidates |
`array | null` | No |
votesStartAt |
`string | null` | No |
votesEndAt |
`string | null` | No |
votesCount |
`integer | null` | No |
electedCount |
`integer | null` | No |
createdAt |
`string | null` | No |
status |
`string | null` | No |
votes |
`object | null` | No |
A candidate in an election.
| Field | Type | Required | Description |
|---|---|---|---|
user |
`string | null` | No |
voteCount |
`integer | null` | No |
article |
`string | null` | No |
party |
`string | null` | No |
isElected |
`boolean | null` | No |
Get elections (cursor-paginated), optionally filtered by country.
Args:
country_id: Filter to elections in this country.
direction: "forward" (default) or "backward" pagination.
await client.election.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[Election] | AsyncIterator[Election]'| Name | Type | Default |
|---|---|---|
country_id |
`str | None` |
limit |
int |
20 |
cursor |
`str | None` |
direction |
`str | None` |
auto_items |
bool |
False |
max_pages |
`int | float` |
cursor_end |
`str | None` |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
items |
array |
Yes | |
nextCursor |
`string | null` | No |
hasMore |
boolean |
No |
An election event in a country.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
`string | null` | No |
__v |
`integer | null` | No |
country |
`string | null` | No |
electedCandidates |
`array | null` | No |
isActive |
`boolean | null` | No |
type |
`string | null` | No |
candidates |
`array | null` | No |
votesStartAt |
`string | null` | No |
votesEndAt |
`string | null` | No |
votesCount |
`integer | null` | No |
electedCount |
`integer | null` | No |
createdAt |
`string | null` | No |
status |
`string | null` | No |
votes |
`object | null` | No |
A candidate in an election.
| Field | Type | Required | Description |
|---|---|---|---|
user |
`string | null` | No |
voteCount |
`integer | null` | No |
article |
`string | null` | No |
party |
`string | null` | No |
isElected |
`boolean | null` | No |
Clear the SWR cache for all resources.
await client.election.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