-
Notifications
You must be signed in to change notification settings - Fork 2
Resource MUResource
CrucifiedPain edited this page Jun 26, 2026
·
10 revisions
Endpoints: • mu.getById • mu.getManyPaginated (cursor-paginated)
Fetch all items across all pages concurrently using parallel time-slicing.
await client.mu.collect_all(**kwargs: 'typing.Any') -> 'list[MilitaryUnit]'| Name | Type | Default |
|---|---|---|
kwargs |
Any |
*Required* |
| 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. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
headquarters |
integer |
Optional | The headquarters. |
dormitories |
integer |
Optional | The dormitories. |
| 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. |
| 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. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
commanders |
array[string] |
Optional | The commanders. |
managers |
array[string] |
Optional | The managers. |
| 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 a military unit by ID.
await client.mu.get(mu_id: 'str') -> 'MilitaryUnit'| Name | Type | Default |
|---|---|---|
mu_id |
str |
*Required* |
| 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. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
headquarters |
integer |
Optional | The headquarters. |
dormitories |
integer |
Optional | The dormitories. |
| 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. |
| 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. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
commanders |
array[string] |
Optional | The commanders. |
managers |
array[string] |
Optional | The managers. |
| 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. |
Fetch multiple military units by ID concurrently using the auto-batcher.
await client.mu.get_many(mu_ids: 'list[str]') -> 'list[MilitaryUnit | None]'| Name | Type | Default |
|---|---|---|
mu_ids |
list[str] |
*Required* |
| 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. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
headquarters |
integer |
Optional | The headquarters. |
dormitories |
integer |
Optional | The dormitories. |
| 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. |
| 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. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
commanders |
array[string] |
Optional | The commanders. |
managers |
array[string] |
Optional | The managers. |
| 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 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.
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]'| 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 |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
items |
array[MilitaryUnit] |
Required | |
nextCursor |
string |
Optional | |
hasMore |
boolean |
Optional |
| 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. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
headquarters |
integer |
Optional | The headquarters. |
dormitories |
integer |
Optional | The dormitories. |
| 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. |
| 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. |
| Field | Type | Required | Description |
|---|---|---|---|
_id |
string |
Optional | |
__v |
integer |
Optional | |
commanders |
array[string] |
Optional | The commanders. |
managers |
array[string] |
Optional | The managers. |
| 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. |
Clear the SWR cache for all resources.
await client.mu.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