Commit 8b9b43a
Update Steam inventory endpoint to match frontend specification
Changes to lib/steam-inventory.js:
- Changed field names to match frontend spec (assetid instead of asset_id)
- Added wear abbreviations (FN, MW, FT, WW, BS)
- Added wear_full field for full wear name
- Separated icon_url (path only) from image_url (full CDN URL)
- Added float_value, pattern_index, defindex, paintindex placeholders
- Extracted defindex from inspect link parameters
- Added both full and abbreviated wear formats
Changes to index.js:
- Updated inventory sync endpoint to use assetid field
Response format now includes:
- assetid, classid, instanceid (core IDs)
- name, market_name, market_hash_name (display names)
- icon_url (CDN path), image_url (full URL)
- tradable, marketable, commodity (trading flags)
- is_stattrak, is_souvenir (item attributes)
- wear (FN/MW/FT/WW/BS), wear_full (Factory New, etc)
- float_value, pattern_index, defindex, paintindex (inspection data)
- rarity, weapon_type, category, quality (item metadata)
- inspect_link (for float inspection)
Endpoint: GET /api/steam/inventory/:steamId
Authentication: Required (Better Auth session token)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 3bcd1e3 commit 8b9b43a
2 files changed
Lines changed: 66 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4092 | 4092 | | |
4093 | 4093 | | |
4094 | 4094 | | |
4095 | | - | |
| 4095 | + | |
4096 | 4096 | | |
4097 | 4097 | | |
4098 | 4098 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
79 | 88 | | |
80 | 89 | | |
81 | 90 | | |
| |||
89 | 98 | | |
90 | 99 | | |
91 | 100 | | |
92 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
93 | 107 | | |
94 | | - | |
95 | | - | |
96 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
97 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
98 | 136 | | |
99 | 137 | | |
100 | 138 | | |
101 | 139 | | |
102 | 140 | | |
103 | 141 | | |
| 142 | + | |
| 143 | + | |
104 | 144 | | |
105 | 145 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
110 | 154 | | |
111 | 155 | | |
112 | 156 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 157 | + | |
118 | 158 | | |
119 | 159 | | |
120 | 160 | | |
121 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
122 | 168 | | |
123 | 169 | | |
124 | 170 | | |
| |||
196 | 242 | | |
197 | 243 | | |
198 | 244 | | |
199 | | - | |
| 245 | + | |
| 246 | + | |
200 | 247 | | |
201 | 248 | | |
202 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
203 | 252 | | |
204 | 253 | | |
205 | 254 | | |
| |||
0 commit comments