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 \| null
__v integer \| null
name string \| null
countryId string \| null
ownerId string \| null
members array[string] \| null
damage number \| null
terrain number \| null
wealth number \| null
image string \| null
description string \| null
isRecruiting boolean \| null
activeUpgradeLevels MuActiveUpgradeLevels \| null
avatarUrl string \| null
rankings MuRankings \| null
region string \| null
roles MuRoles \| null
user string \| null
leveling MuLeveling \| null
investedMoneyByUsers object \| null
mercenaryReputation number \| null
lastReputationBuyAt string \| null
createdAt string \| null
updatedAt string \| null

MuActiveUpgradeLevels

Field Type Required Description
_id string \| null
__v integer \| null
headquarters integer \| null
dormitories integer \| null

MuLeveling

Field Type Required Description
_id string \| null
__v integer \| null
level integer \| null
monthlyDamages number \| null

MuRankings

Field Type Required Description
_id string \| null
__v integer \| null
muWeeklyDamages RankingDetail \| null
muDamages RankingDetail \| null
muTerrain RankingDetail \| null
muWealth RankingDetail \| null
muBounty RankingDetail \| null
muReputation RankingDetail \| null

MuRoles

Field Type Required Description
_id string \| null
__v integer \| null
commanders array[string] \| null
managers array[string] \| null

RankingDetail

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

.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 \| null
__v integer \| null
name string \| null
countryId string \| null
ownerId string \| null
members array[string] \| null
damage number \| null
terrain number \| null
wealth number \| null
image string \| null
description string \| null
isRecruiting boolean \| null
activeUpgradeLevels MuActiveUpgradeLevels \| null
avatarUrl string \| null
rankings MuRankings \| null
region string \| null
roles MuRoles \| null
user string \| null
leveling MuLeveling \| null
investedMoneyByUsers object \| null
mercenaryReputation number \| null
lastReputationBuyAt string \| null
createdAt string \| null
updatedAt string \| null

MuActiveUpgradeLevels

Field Type Required Description
_id string \| null
__v integer \| null
headquarters integer \| null
dormitories integer \| null

MuLeveling

Field Type Required Description
_id string \| null
__v integer \| null
level integer \| null
monthlyDamages number \| null

MuRankings

Field Type Required Description
_id string \| null
__v integer \| null
muWeeklyDamages RankingDetail \| null
muDamages RankingDetail \| null
muTerrain RankingDetail \| null
muWealth RankingDetail \| null
muBounty RankingDetail \| null
muReputation RankingDetail \| null

MuRoles

Field Type Required Description
_id string \| null
__v integer \| null
commanders array[string] \| null
managers array[string] \| null

RankingDetail

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

.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 \| null
__v integer \| null
name string \| null
countryId string \| null
ownerId string \| null
members array[string] \| null
damage number \| null
terrain number \| null
wealth number \| null
image string \| null
description string \| null
isRecruiting boolean \| null
activeUpgradeLevels MuActiveUpgradeLevels \| null
avatarUrl string \| null
rankings MuRankings \| null
region string \| null
roles MuRoles \| null
user string \| null
leveling MuLeveling \| null
investedMoneyByUsers object \| null
mercenaryReputation number \| null
lastReputationBuyAt string \| null
createdAt string \| null
updatedAt string \| null

MuActiveUpgradeLevels

Field Type Required Description
_id string \| null
__v integer \| null
headquarters integer \| null
dormitories integer \| null

MuLeveling

Field Type Required Description
_id string \| null
__v integer \| null
level integer \| null
monthlyDamages number \| null

MuRankings

Field Type Required Description
_id string \| null
__v integer \| null
muWeeklyDamages RankingDetail \| null
muDamages RankingDetail \| null
muTerrain RankingDetail \| null
muWealth RankingDetail \| null
muBounty RankingDetail \| null
muReputation RankingDetail \| null

MuRoles

Field Type Required Description
_id string \| null
__v integer \| null
commanders array[string] \| null
managers array[string] \| null

RankingDetail

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

.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 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

Return Models

CursorPage[MilitaryUnit]

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

MilitaryUnit

Field Type Required Description
_id string \| null
__v integer \| null
name string \| null
countryId string \| null
ownerId string \| null
members array[string] \| null
damage number \| null
terrain number \| null
wealth number \| null
image string \| null
description string \| null
isRecruiting boolean \| null
activeUpgradeLevels MuActiveUpgradeLevels \| null
avatarUrl string \| null
rankings MuRankings \| null
region string \| null
roles MuRoles \| null
user string \| null
leveling MuLeveling \| null
investedMoneyByUsers object \| null
mercenaryReputation number \| null
lastReputationBuyAt string \| null
createdAt string \| null
updatedAt string \| null

MuActiveUpgradeLevels

Field Type Required Description
_id string \| null
__v integer \| null
headquarters integer \| null
dormitories integer \| null

MuLeveling

Field Type Required Description
_id string \| null
__v integer \| null
level integer \| null
monthlyDamages number \| null

MuRankings

Field Type Required Description
_id string \| null
__v integer \| null
muWeeklyDamages RankingDetail \| null
muDamages RankingDetail \| null
muTerrain RankingDetail \| null
muWealth RankingDetail \| null
muBounty RankingDetail \| null
muReputation RankingDetail \| null

MuRoles

Field Type Required Description
_id string \| null
__v integer \| null
commanders array[string] \| null
managers array[string] \| null

RankingDetail

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

.invalidate_cache()

Clear the SWR cache for all resources.

Signature

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

Clone this wiki locally