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 \| null
__v integer \| null
name string \| null
scheme string \| null
mapAccent string \| null
leader string \| null
memberCountries array[AllianceMemberCountry] \| null
currentDevelopment number \| integer \| null
coreDevelopment number \| integer \| null
averageDevelopment number \| integer \| null
createdAt string \| null
updatedAt string \| null
rankings AllianceRankings \| null
avatarUrl string \| null

AllianceMemberCountry

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

AllianceRankingEntry

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

AllianceRankings

Field Type Required Description
_id string \| null
__v integer \| null
allianceInitialDevelopment AllianceRankingEntry \| null
allianceDevelopment AllianceRankingEntry \| null
allianceWeeklyDamages AllianceRankingEntry \| null
allianceDamages AllianceRankingEntry \| null
alliancePopulation AllianceRankingEntry \| null
allianceWeeklyDamagesPerCitizen AllianceRankingEntry \| null

.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 \| null
__v integer \| null
name string \| null
scheme string \| null
mapAccent string \| null
leader string \| null
memberCountries array[AllianceMemberCountry] \| null
currentDevelopment number \| integer \| null
coreDevelopment number \| integer \| null
averageDevelopment number \| integer \| null
createdAt string \| null
updatedAt string \| null
rankings AllianceRankings \| null
avatarUrl string \| null

AllianceMemberCountry

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

AllianceRankingEntry

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

AllianceRankings

Field Type Required Description
_id string \| null
__v integer \| null
allianceInitialDevelopment AllianceRankingEntry \| null
allianceDevelopment AllianceRankingEntry \| null
allianceWeeklyDamages AllianceRankingEntry \| null
allianceDamages AllianceRankingEntry \| null
alliancePopulation AllianceRankingEntry \| null
allianceWeeklyDamagesPerCitizen AllianceRankingEntry \| null

.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 \| null
__v integer \| null
name string \| null
scheme string \| null
mapAccent string \| null
leader string \| null
memberCountries array[AllianceMemberCountry] \| null
currentDevelopment number \| integer \| null
coreDevelopment number \| integer \| null
averageDevelopment number \| integer \| null
createdAt string \| null
updatedAt string \| null
rankings AllianceRankings \| null
avatarUrl string \| null

AllianceMemberCountry

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

AllianceRankingEntry

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

AllianceRankings

Field Type Required Description
_id string \| null
__v integer \| null
allianceInitialDevelopment AllianceRankingEntry \| null
allianceDevelopment AllianceRankingEntry \| null
allianceWeeklyDamages AllianceRankingEntry \| null
allianceDamages AllianceRankingEntry \| null
alliancePopulation AllianceRankingEntry \| null
allianceWeeklyDamagesPerCitizen AllianceRankingEntry \| null

.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 None
auto_items bool False
max_pages int | float inf
cursor_end str | None None

Return Models

Alliance

Field Type Required Description
_id string \| null
__v integer \| null
name string \| null
scheme string \| null
mapAccent string \| null
leader string \| null
memberCountries array[AllianceMemberCountry] \| null
currentDevelopment number \| integer \| null
coreDevelopment number \| integer \| null
averageDevelopment number \| integer \| null
createdAt string \| null
updatedAt string \| null
rankings AllianceRankings \| null
avatarUrl string \| null

AllianceMemberCountry

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

AllianceRankingEntry

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

AllianceRankings

Field Type Required Description
_id string \| null
__v integer \| null
allianceInitialDevelopment AllianceRankingEntry \| null
allianceDevelopment AllianceRankingEntry \| null
allianceWeeklyDamages AllianceRankingEntry \| null
allianceDamages AllianceRankingEntry \| null
alliancePopulation AllianceRankingEntry \| null
allianceWeeklyDamagesPerCitizen AllianceRankingEntry \| null

CursorPage[Alliance]

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

.invalidate_cache()

Clear the SWR cache for all resources.

Signature

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

Clone this wiki locally