Skip to content

Resource AllianceResource

CrucifiedPain edited this page Jun 26, 2026 · 10 revisions

AllianceResource (client.alliance)

Endpoints: • alliance.getById • alliance.getByIds • alliance.getManyPaginated (cursor-paginated)

.collect_all()

Fetch all items across all pages concurrently using parallel time-slicing.

Signature

await client.alliance.collect_all(**kwargs: 'typing.Any') -> 'list[Alliance]'

Parameters

Name Type Default
kwargs Any *Required*

Return Models

Alliance

Field Type Required Description
_id string Optional
__v integer Optional
name string Optional The official name of the country.
scheme string Optional The scheme.
mapAccent string Optional The map accent.
leader string Optional
memberCountries array[AllianceMemberCountry] Optional The member countries.
currentDevelopment number | integer Optional The current development.
coreDevelopment number | integer Optional The core development.
averageDevelopment number | integer Optional The average development.
createdAt string Optional The timestamp when this record was created.
updatedAt string Optional The timestamp when this record was last modified.
rankings AllianceRankings Optional The country's current standing in the global leaderboards.
avatarUrl string Optional The CDN URL pointing to the user's profile picture.

AllianceMemberCountry

Field Type Required Description
_id string Optional
__v integer Optional
country string Optional
coreDevelopment number | integer Optional
averageDevelopment number | integer Optional
suspended boolean Optional

AllianceRankingEntry

Field Type Required Description
_id string Optional
__v integer Optional
value number | integer Optional
rank integer Optional
tier string Optional

AllianceRankings

Field Type Required Description
_id string Optional
__v integer Optional
allianceInitialDevelopment AllianceRankingEntry Optional
allianceDevelopment AllianceRankingEntry Optional
allianceWeeklyDamages AllianceRankingEntry Optional
allianceDamages AllianceRankingEntry Optional
alliancePopulation AllianceRankingEntry Optional
allianceWeeklyDamagesPerCitizen AllianceRankingEntry Optional

.get()

Get a single alliance by ID.

Signature

await client.alliance.get(alliance_id: 'str') -> 'Alliance'

Parameters

Name Type Default
alliance_id str *Required*

Return Models

Alliance

Field Type Required Description
_id string Optional
__v integer Optional
name string Optional The official name of the country.
scheme string Optional The scheme.
mapAccent string Optional The map accent.
leader string Optional
memberCountries array[AllianceMemberCountry] Optional The member countries.
currentDevelopment number | integer Optional The current development.
coreDevelopment number | integer Optional The core development.
averageDevelopment number | integer Optional The average development.
createdAt string Optional The timestamp when this record was created.
updatedAt string Optional The timestamp when this record was last modified.
rankings AllianceRankings Optional The country's current standing in the global leaderboards.
avatarUrl string Optional The CDN URL pointing to the user's profile picture.

AllianceMemberCountry

Field Type Required Description
_id string Optional
__v integer Optional
country string Optional
coreDevelopment number | integer Optional
averageDevelopment number | integer Optional
suspended boolean Optional

AllianceRankingEntry

Field Type Required Description
_id string Optional
__v integer Optional
value number | integer Optional
rank integer Optional
tier string Optional

AllianceRankings

Field Type Required Description
_id string Optional
__v integer Optional
allianceInitialDevelopment AllianceRankingEntry Optional
allianceDevelopment AllianceRankingEntry Optional
allianceWeeklyDamages AllianceRankingEntry Optional
allianceDamages AllianceRankingEntry Optional
alliancePopulation AllianceRankingEntry Optional
allianceWeeklyDamagesPerCitizen AllianceRankingEntry Optional

.get_many()

Get multiple alliances by their IDs.

Signature

await client.alliance.get_many(ids: 'list[str]') -> 'list[Alliance]'

Parameters

Name Type Default
ids list[str] *Required*

Return Models

Alliance

Field Type Required Description
_id string Optional
__v integer Optional
name string Optional The official name of the country.
scheme string Optional The scheme.
mapAccent string Optional The map accent.
leader string Optional
memberCountries array[AllianceMemberCountry] Optional The member countries.
currentDevelopment number | integer Optional The current development.
coreDevelopment number | integer Optional The core development.
averageDevelopment number | integer Optional The average development.
createdAt string Optional The timestamp when this record was created.
updatedAt string Optional The timestamp when this record was last modified.
rankings AllianceRankings Optional The country's current standing in the global leaderboards.
avatarUrl string Optional The CDN URL pointing to the user's profile picture.

AllianceMemberCountry

Field Type Required Description
_id string Optional
__v integer Optional
country string Optional
coreDevelopment number | integer Optional
averageDevelopment number | integer Optional
suspended boolean Optional

AllianceRankingEntry

Field Type Required Description
_id string Optional
__v integer Optional
value number | integer Optional
rank integer Optional
tier string Optional

AllianceRankings

Field Type Required Description
_id string Optional
__v integer Optional
allianceInitialDevelopment AllianceRankingEntry Optional
allianceDevelopment AllianceRankingEntry Optional
allianceWeeklyDamages AllianceRankingEntry Optional
allianceDamages AllianceRankingEntry Optional
alliancePopulation AllianceRankingEntry Optional
allianceWeeklyDamagesPerCitizen AllianceRankingEntry Optional

.get_paginated()

Get alliances (cursor-paginated).

Signature

await client.alliance.get_paginated(*, limit: 'int' = 20, cursor: 'str | None' = None, auto_items: 'bool' = False, max_pages: 'int | float' = inf, cursor_end: 'str | None' = None) -> 'CursorPage[Alliance] | AsyncIterator[Alliance]'

Parameters

Name Type Default
limit int 20
cursor str None
auto_items bool False
max_pages int | float inf
cursor_end str None

Return Models

Alliance

Field Type Required Description
_id string Optional
__v integer Optional
name string Optional The official name of the country.
scheme string Optional The scheme.
mapAccent string Optional The map accent.
leader string Optional
memberCountries array[AllianceMemberCountry] Optional The member countries.
currentDevelopment number | integer Optional The current development.
coreDevelopment number | integer Optional The core development.
averageDevelopment number | integer Optional The average development.
createdAt string Optional The timestamp when this record was created.
updatedAt string Optional The timestamp when this record was last modified.
rankings AllianceRankings Optional The country's current standing in the global leaderboards.
avatarUrl string Optional The CDN URL pointing to the user's profile picture.

AllianceMemberCountry

Field Type Required Description
_id string Optional
__v integer Optional
country string Optional
coreDevelopment number | integer Optional
averageDevelopment number | integer Optional
suspended boolean Optional

AllianceRankingEntry

Field Type Required Description
_id string Optional
__v integer Optional
value number | integer Optional
rank integer Optional
tier string Optional

AllianceRankings

Field Type Required Description
_id string Optional
__v integer Optional
allianceInitialDevelopment AllianceRankingEntry Optional
allianceDevelopment AllianceRankingEntry Optional
allianceWeeklyDamages AllianceRankingEntry Optional
allianceDamages AllianceRankingEntry Optional
alliancePopulation AllianceRankingEntry Optional
allianceWeeklyDamagesPerCitizen AllianceRankingEntry Optional

CursorPage[Alliance]

Field Type Required Description
_id string Optional
__v integer Optional
items array[Alliance] Required
nextCursor string Optional
hasMore boolean Optional

.invalidate_cache()

Clear the SWR cache for all resources.

Signature

await client.alliance.invalidate_cache() -> 'None'

Clone this wiki locally