InventoryResource (client.inventory)¶
Endpoints: • inventory.fetchCurrentEquipment
.get_equipment()¶
Get the currently equipped items for a user.
Args: user_id: The unique identifier of the user.
Signature¶
await client.inventory.get_equipment(user_id: 'str') -> 'list[Equipment]'
Parameters¶
| Name | Type | Default |
|---|---|---|
user_id |
str |
Required |
Return Models¶
Equipment¶
A single equipped item returned by inventory.fetchCurrentEquipment.
The API returns one object keyed by slot (weapon, helmet, ...);
the resource flattens it into a list of Equipment with slot set.
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
slot |
string |
Optional |
itemId |
string |
Optional |
itemCode |
string |
Optional |
name |
string |
Optional |
rarity |
string |
Optional |
stats |
object |
Optional |
type |
string |
Optional |
code |
string |
Optional |
skills |
EquipmentSkills |
Optional |
state |
number |
Optional |
maxState |
number |
Optional |
quantity |
integer |
Optional |
lastAcquisitionAt |
string |
Optional |
EquipmentSkills¶
Stat bonuses granted by an equipped item.
| Field | Type | Required |
|---|---|---|
_id |
string |
Optional |
__v |
integer |
Optional |
attack |
number |
Optional |
armor |
number |
Optional |
criticalChance |
number |
Optional |
criticalDamages |
number |
Optional |
dodge |
number |
Optional |
precision |
number |
Optional |
.invalidate_cache()¶
Clear the SWR cache for all resources.
Signature¶
await client.inventory.invalidate_cache() -> 'None'