This returns the asset class for a list of arbitrary asset IDs in a context.Called by:
Inventory UIHTTP Method:
|appid||uint32||✔||32bit App ID of the application associated with the assets.|
|contextid||uint64||✔||The 64-bit ID of the context these assets can be found in.|
|asset_count||uint32||✔||The number of assets being requested.|
|asset#||uint32||✔||The 64-bit asset ID being requested. There will be one of these parameters for each number between 0 and asset_count-1. (e.g. asset0, asset1, asset2)|
The output from this method should be encoded in the JSON format.Response:
success - True if the method was successful. If the asset server is returning false, it should set
error to a string that explains why.
error - a string describing why this call failed. This message will be recorded in the error log, which is available under the Economy tab on the Steamworks site.
assets - an array of the asset class details for the specified context and asset IDs. This is largely the same data returned by GetContextContents/v0001 with the addition of the owner field.
id - The 64-bit ID of the asset.
owner - The steamid of the owner of the asset.
class - An array of game-defined asset class identifiers. It is up to the game to define what those identifiers are. They just need to provide enough information to reproduce the asset info (i.e. describe what kind of item it is) when the class identifiers are passed back into GetAssetClassInfo/v0001. Each identifier should contain the following fields:
To maximize the amount of description information that Steam can cache, the class identifiers should be as generic and reusable as possible. For example, avoid a class where you just have one property with a name like "itemid" and a value that's the 64-bit ID of the asset. Instead, describe what kind of item it is in a way that gives you enough information to build the description. For example, an asset class of "type" = "sword" and "rarity" = "common" gives you enough information to build the item's description without having to know exactly which instance of the item it is.
name - The name of this part of the class identifier.
value - The value of this part of the class identifier as a string.
instance - If this is true the class identifier is considered "instance data", which means that it generally doesn't transfer with the item on a trade, and so it doesn't factor into the trade value of the item. (Default: false)
NOTE: An asset class property that ultimately has an effect on the
market_hash_name of an item in the GetAssetClassInfo/v0001 response should never be considered instance data. The Community Market depends on instance properties not having any effect on the
amount (optional) - The stack count for this asset. The user will be able to trade up to this number of units out of this stack. (Default: 1)