Skip to content

Resource MUResource

CrucifiedPain edited this page Jun 26, 2026 · 10 revisions

MUResource (client.mu)

Endpoints: • mu.getById • mu.getManyPaginated (cursor-paginated)

.collect_all()

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

Signature

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

Parameters

Name Type Default
kwargs Any *Required*

Return Models

MilitaryUnit

Field Type Required Description
_id string Optional
__v integer Optional
name string Optional The official name of the country.
countryId string Optional The country id.
ownerId string Optional The owner id.
members array[string] Optional The members. API returns a list of member user ID strings.
damage number Optional The damage.
terrain number Optional The terrain.
wealth number Optional The wealth.
image string Optional The image.
description string Optional The description.
isRecruiting boolean Optional The is recruiting.
activeUpgradeLevels MuActiveUpgradeLevels Optional The active upgrade levels.
avatarUrl string Optional The CDN URL pointing to the user's profile picture.
rankings MuRankings Optional The country's current standing in the global leaderboards.
region string Optional The UUID of the contested region.
roles MuRoles Optional The roles.
user string Optional The user.
leveling MuLeveling Optional The leveling.
investedMoneyByUsers object Optional The invested money by users.
mercenaryReputation number Optional The mercenary reputation.
lastReputationBuyAt string Optional The timestamp of the last reputation buy event.
createdAt string Optional The timestamp when this record was created.
updatedAt string Optional The timestamp when this record was last modified.

MuActiveUpgradeLevels

Field Type Required Description
_id string Optional
__v integer Optional
headquarters integer Optional The headquarters.
dormitories integer Optional The dormitories.

MuLeveling

Field Type Required Description
_id string Optional
__v integer Optional
level integer Optional The current overall level of the entity.
monthlyDamages number Optional The monthly damages.

MuRankings

Field Type Required Description
_id string Optional
__v integer Optional
muWeeklyDamages RankingDetail Optional The mu weekly damages.
muDamages RankingDetail Optional The mu damages.
muTerrain RankingDetail Optional The mu terrain.
muWealth RankingDetail Optional The mu wealth.
muBounty RankingDetail Optional The mu bounty.
muReputation RankingDetail Optional The mu reputation.

MuRoles

Field Type Required Description
_id string Optional
__v integer Optional
commanders array[string] Optional The commanders.
managers array[string] Optional The managers.

RankingDetail

Field Type Required Description
_id string Optional
__v integer Optional
value number Optional The value.
rank integer Optional The rank.
tier string Optional The tier.
country string Optional The UUID of the country this user holds citizenship in.

.get()

Get a military unit by ID.

Signature

await client.mu.get(mu_id: 'str') -> 'MilitaryUnit'

Parameters

Name Type Default
mu_id str *Required*

Return Models

MilitaryUnit

Field Type Required Description
_id string Optional
__v integer Optional
name string Optional The official name of the country.
countryId string Optional The country id.
ownerId string Optional The owner id.
members array[string] Optional The members. API returns a list of member user ID strings.
damage number Optional The damage.
terrain number Optional The terrain.
wealth number Optional The wealth.
image string Optional The image.
description string Optional The description.
isRecruiting boolean Optional The is recruiting.
activeUpgradeLevels MuActiveUpgradeLevels Optional The active upgrade levels.
avatarUrl string Optional The CDN URL pointing to the user's profile picture.
rankings MuRankings Optional The country's current standing in the global leaderboards.
region string Optional The UUID of the contested region.
roles MuRoles Optional The roles.
user string Optional The user.
leveling MuLeveling Optional The leveling.
investedMoneyByUsers object Optional The invested money by users.
mercenaryReputation number Optional The mercenary reputation.
lastReputationBuyAt string Optional The timestamp of the last reputation buy event.
createdAt string Optional The timestamp when this record was created.
updatedAt string Optional The timestamp when this record was last modified.

MuActiveUpgradeLevels

Field Type Required Description
_id string Optional
__v integer Optional
headquarters integer Optional The headquarters.
dormitories integer Optional The dormitories.

MuLeveling

Field Type Required Description
_id string Optional
__v integer Optional
level integer Optional The current overall level of the entity.
monthlyDamages number Optional The monthly damages.

MuRankings

Field Type Required Description
_id string Optional
__v integer Optional
muWeeklyDamages RankingDetail Optional The mu weekly damages.
muDamages RankingDetail Optional The mu damages.
muTerrain RankingDetail Optional The mu terrain.
muWealth RankingDetail Optional The mu wealth.
muBounty RankingDetail Optional The mu bounty.
muReputation RankingDetail Optional The mu reputation.

MuRoles

Field Type Required Description
_id string Optional
__v integer Optional
commanders array[string] Optional The commanders.
managers array[string] Optional The managers.

RankingDetail

Field Type Required Description
_id string Optional
__v integer Optional
value number Optional The value.
rank integer Optional The rank.
tier string Optional The tier.
country string Optional The UUID of the country this user holds citizenship in.

.get_many()

Fetch multiple military units by ID concurrently using the auto-batcher.

Signature

await client.mu.get_many(mu_ids: 'list[str]') -> 'list[MilitaryUnit | None]'

Parameters

Name Type Default
mu_ids list[str] *Required*

Return Models

MilitaryUnit

Field Type Required Description
_id string Optional
__v integer Optional
name string Optional The official name of the country.
countryId string Optional The country id.
ownerId string Optional The owner id.
members array[string] Optional The members. API returns a list of member user ID strings.
damage number Optional The damage.
terrain number Optional The terrain.
wealth number Optional The wealth.
image string Optional The image.
description string Optional The description.
isRecruiting boolean Optional The is recruiting.
activeUpgradeLevels MuActiveUpgradeLevels Optional The active upgrade levels.
avatarUrl string Optional The CDN URL pointing to the user's profile picture.
rankings MuRankings Optional The country's current standing in the global leaderboards.
region string Optional The UUID of the contested region.
roles MuRoles Optional The roles.
user string Optional The user.
leveling MuLeveling Optional The leveling.
investedMoneyByUsers object Optional The invested money by users.
mercenaryReputation number Optional The mercenary reputation.
lastReputationBuyAt string Optional The timestamp of the last reputation buy event.
createdAt string Optional The timestamp when this record was created.
updatedAt string Optional The timestamp when this record was last modified.

MuActiveUpgradeLevels

Field Type Required Description
_id string Optional
__v integer Optional
headquarters integer Optional The headquarters.
dormitories integer Optional The dormitories.

MuLeveling

Field Type Required Description
_id string Optional
__v integer Optional
level integer Optional The current overall level of the entity.
monthlyDamages number Optional The monthly damages.

MuRankings

Field Type Required Description
_id string Optional
__v integer Optional
muWeeklyDamages RankingDetail Optional The mu weekly damages.
muDamages RankingDetail Optional The mu damages.
muTerrain RankingDetail Optional The mu terrain.
muWealth RankingDetail Optional The mu wealth.
muBounty RankingDetail Optional The mu bounty.
muReputation RankingDetail Optional The mu reputation.

MuRoles

Field Type Required Description
_id string Optional
__v integer Optional
commanders array[string] Optional The commanders.
managers array[string] Optional The managers.

RankingDetail

Field Type Required Description
_id string Optional
__v integer Optional
value number Optional The value.
rank integer Optional The rank.
tier string Optional The tier.
country string Optional The UUID of the country this user holds citizenship in.

.get_paginated()

Get military units (cursor-paginated).

Args: member_id: Filter: MUs that this user is a member of. user_id: Filter: MUs owned/created by this user. search: Text search across MU names.

Signature

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

Parameters

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

Return Models

CursorPage[MilitaryUnit]

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

MilitaryUnit

Field Type Required Description
_id string Optional
__v integer Optional
name string Optional The official name of the country.
countryId string Optional The country id.
ownerId string Optional The owner id.
members array[string] Optional The members. API returns a list of member user ID strings.
damage number Optional The damage.
terrain number Optional The terrain.
wealth number Optional The wealth.
image string Optional The image.
description string Optional The description.
isRecruiting boolean Optional The is recruiting.
activeUpgradeLevels MuActiveUpgradeLevels Optional The active upgrade levels.
avatarUrl string Optional The CDN URL pointing to the user's profile picture.
rankings MuRankings Optional The country's current standing in the global leaderboards.
region string Optional The UUID of the contested region.
roles MuRoles Optional The roles.
user string Optional The user.
leveling MuLeveling Optional The leveling.
investedMoneyByUsers object Optional The invested money by users.
mercenaryReputation number Optional The mercenary reputation.
lastReputationBuyAt string Optional The timestamp of the last reputation buy event.
createdAt string Optional The timestamp when this record was created.
updatedAt string Optional The timestamp when this record was last modified.

MuActiveUpgradeLevels

Field Type Required Description
_id string Optional
__v integer Optional
headquarters integer Optional The headquarters.
dormitories integer Optional The dormitories.

MuLeveling

Field Type Required Description
_id string Optional
__v integer Optional
level integer Optional The current overall level of the entity.
monthlyDamages number Optional The monthly damages.

MuRankings

Field Type Required Description
_id string Optional
__v integer Optional
muWeeklyDamages RankingDetail Optional The mu weekly damages.
muDamages RankingDetail Optional The mu damages.
muTerrain RankingDetail Optional The mu terrain.
muWealth RankingDetail Optional The mu wealth.
muBounty RankingDetail Optional The mu bounty.
muReputation RankingDetail Optional The mu reputation.

MuRoles

Field Type Required Description
_id string Optional
__v integer Optional
commanders array[string] Optional The commanders.
managers array[string] Optional The managers.

RankingDetail

Field Type Required Description
_id string Optional
__v integer Optional
value number Optional The value.
rank integer Optional The rank.
tier string Optional The tier.
country string Optional The UUID of the country this user holds citizenship in.

.invalidate_cache()

Clear the SWR cache for all resources.

Signature

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

Clone this wiki locally