How to get the classID for item using GetAssetClassInfo in the Steam Web API?

StackOverflow https://stackoverflow.com/questions/8627111

  •  29-03-2021
  •  | 
  •  

Pergunta

The Steam WebAPI allows for downloading game and player items. The GetSchema service, however, does not included the item attributes and description. This information is contained in the GetAssetClassInfo service. The required parameters for this service include a classid, but the documentation is not at all clear where this identifier is defined or derived. How do I get the classID for a given item?

Foi útil?

Solução

I hopped onto the IRC channel of the maintainers of the TF2 Wiki to ferret out this piece of information and then updated the service documentation.

Essentially, you have to do a 'GetSchema' call to get all the items, then call the GetAssetPrices service. While the service describes getting the pricing information of items, it also reveals a mapping between the defindex from the GetSchema service and the classID. With that mapping in hand, you can then call the GetAssetClassInfo service using the classID.

This information is now officially documented in the wiki. :)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top