nosoop / SteamTrade-Java

An unofficial trading library for Valve's Steam Community service.
12 stars 2 forks source link

Patch up inventory support for large inventories. #4

Closed nosoop closed 10 years ago

nosoop commented 10 years ago

For inventories with more than 2500 items (backpack.tf's card swap bots, mainly), it takes multiple page loads to fully download the inventory.

Current URL format: http://steamcommunity.com/trade/STEAMID/foreigninventory/?sessionid=SESSIONID&steamid=STEAMID&appid=APPID&contextid=CONTEXTID

If there is a boolean value named more in the response, there is more to load. The integer value to add to the request is available under the key more_start, which is a multiple of 2500.

So the request then looks like this: http://steamcommunity.com/trade/STEAMID/foreigninventory/?sessionid=SESSIONID&steamid=STEAMID&appid=APPID&contextid=CONTEXTID&start=MORE_START

Figure out the best way to load the rest of the inventory from here.

nosoop commented 10 years ago

Fixed as of commit 14267ad3243eb5da86e2d3416fa473e85b3e6d71. Had the wrong one previously.