-
Notifications
You must be signed in to change notification settings - Fork 2
Resource DonationResource
CrucifiedPain edited this page Jun 26, 2026
·
10 revisions
Endpoints: • donation.getManyPaginated (cursor-paginated) • donation.getTotalDonations
Fetch all items across all pages concurrently using parallel time-slicing.
await client.donation.collect_all(**kwargs: 'typing.Any') -> 'list[Donation]'| Name | Type | Default |
|---|---|---|
kwargs |
Any |
*Required* |
A donation made to a military unit, country, or party.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string \| null |
❌ | |
__v |
integer \| null |
❌ | |
userId |
string \| null |
❌ | |
muId |
string \| null |
❌ | |
countryId |
string \| null |
❌ | |
partyId |
string \| null |
❌ | |
amount |
number \| null |
❌ | |
createdAt |
string \| null |
❌ | |
updatedAt |
string \| null |
❌ |
Get donations (cursor-paginated), filtered by target entity.
At least one of mu_id, country_id, or party_id is recommended.
Args:
direction: "forward" (default) or "backward" pagination.
await client.donation.get_paginated(*, mu_id: 'str | None' = None, country_id: 'str | None' = None, party_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[Donation] | AsyncIterator[Donation]'| Name | Type | Default |
|---|---|---|
mu_id |
str | None |
None |
country_id |
str | None |
None |
party_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 |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string \| null |
❌ | |
__v |
integer \| null |
❌ | |
items |
array[Donation] |
✅ | |
nextCursor |
string \| null |
❌ | |
hasMore |
boolean |
❌ |
A donation made to a military unit, country, or party.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string \| null |
❌ | |
__v |
integer \| null |
❌ | |
userId |
string \| null |
❌ | |
muId |
string \| null |
❌ | |
countryId |
string \| null |
❌ | |
partyId |
string \| null |
❌ | |
amount |
number \| null |
❌ | |
createdAt |
string \| null |
❌ | |
updatedAt |
string \| null |
❌ |
Get aggregate donation totals (total amount and donor count) for a target.
Args: mu_id: Military unit to aggregate for. country_id: Country to aggregate for. party_id: Party to aggregate for.
await client.donation.get_totals(*, mu_id: 'str | None' = None, country_id: 'str | None' = None, party_id: 'str | None' = None) -> 'DonationTotals'| Name | Type | Default |
|---|---|---|
mu_id |
str | None |
None |
country_id |
str | None |
None |
party_id |
str | None |
None |
Aggregate donation totals for a target.
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string \| null |
❌ | |
__v |
integer \| null |
❌ | |
totalAmount |
number \| null |
❌ | |
donorCount |
integer \| null |
❌ |
Clear the SWR cache for all resources.
await client.donation.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