Difference between revisions of "WebAPI/GetAssetClassInfo"

From Team Fortress Wiki
Jump to: navigation, search
(I almost definitely did not copy and paste this footer.)
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
This documentation is for version v0001 of GetAssetPrices.
 
 
 
== URL ==
 
== URL ==
<nowiki>http://api.steampowered.com/ISteamEconomy/GetAssetPrices/v0001/</nowiki>
+
<nowiki>GET http://api.steampowered.com/ISteamEconomy/GetAssetClassInfo/v0001/</nowiki>
 
 
See the [[WebAPI#appids|ID list]] for a valid ID.
 
  
 
== Method-specific Parameters ==
 
== Method-specific Parameters ==
; appid
+
; appid (uint32)
 
:The [[WebAPI#appids|ID]] of the game to query assets from.
 
:The [[WebAPI#appids|ID]] of the game to query assets from.
  
; language
+
; {{API optional|language}} (string)
 
:The [[Wikipedia:List of ISO 639-1 codes|ISO639-1 language code]] for the language all localized strings should be returned in. Not all strings have been translated to every language. If a language does not have a string, the English string will be returned instead.  If this parameter is omitted the string token will be returned for the strings.
 
:The [[Wikipedia:List of ISO 639-1 codes|ISO639-1 language code]] for the language all localized strings should be returned in. Not all strings have been translated to every language. If a language does not have a string, the English string will be returned instead.  If this parameter is omitted the string token will be returned for the strings.
  
Supported languages:
+
;class_count (uint32): The number of classids passed to the request
* Danish (da, da_DK)
 
* Dutch (nl, nl_NL)
 
* English (en, en_US)
 
* Finnish (fi, fi_FI)
 
* French (fr, fr_FR)
 
* German (de, de_DE)
 
* Hungarian (hu, hu_HU)
 
* Italian (it, it_IT)
 
* Japanese (ja, ja_JP)
 
* Korean (ko, ko_KR)
 
* Norwegian (no, no_NO)
 
* Polish (pl, pl_PL)
 
* Portuguese (pt, pt_PT)
 
* Brazillian Portuguese (pt_BR)
 
* Romanian (ro, ro_RO)
 
* Russian (ru, ru_RU)
 
* Simplified Chinese (zh, zh_CN)
 
* Spanish (es, es_ES)
 
* Swedish (sv, sv_SE)
 
* Traditional Chinese (zh2, zh_TW)
 
* Turkish (tr, tr_TR)
 
  
;classid''N'': Where N can be a series of zero-indexed sequential numbers to form a list of class IDs
+
;classid''N'' (uint64): Where N can be a series of sequential numbers to form a list of class IDs. <ref name="placeholdervar">'''''N''''' refers to an incrementing ID starting from 0. For example: '''<nowiki>http://api.steampowered.com/ISteamEconomy/GetAssetClassInfo/v0001?key=APIKEY&format=json&language=en&appid=440&class_count=2&classid0=195151&classid1=16891096</nowiki>''', with each consecutive classid incrementing from there.</ref> <ref>Currently only schema items have readily available class IDs. See [[../GetAssetPrices|GetAssetPrices]]</ref>
  
;class_count: The number of classids passed to the request
+
;{{API optional|instanceid''N''}} (uint64):Instance ID of the nth class.
  
 
== Result Data ==
 
== Result Data ==
 +
;result:
 +
 +
:;success: '''true''' if the query was successful, '''false''' otherwise.
 +
 +
:;''classnumber'': Where ''classnumber'' is a string corresponding to the given '''classid''N'''''<ref name="placeholdervar"/> list.
  
;success: '''true''' if the query was successful, '''false''' otherwise.
+
::;icon_url: An encoded URL to be passed to http://cdn.steamcommunity.com/economy/image/<encoded url>
  
;''classnumber'': Where ''classnumber'' is a string corresponding to the given '''classid''N''''' list.
+
::;icon_url_large: An encoded URL similar to '''icon_url''' or an empty string if not available.
  
:;icon_url: An encoded URL to be passed to http://cdn.steamcommunity.com/economy/image/<encoded url>
+
::;name: The localized name of the item.
  
:;icon_url_large: An encoded URL similar to '''icon_url''' or an empty string if not available.
+
::;name_color: The RGB tuple used for the item's name line color as a hexadecimal value.
  
:;name: The localized name of the item.
+
::;background_color: The RGB tuple used for the item's cell background as a hexadecimal value.
  
:;name_color: The RGB tuple used for the item's name line color as a hexadecimal value.
+
::;type: The localized string used to display the type of the item or an empty string if not available.
  
:;background_color: The RGB tuple used for the item's cell background as a hexadecimal value.
+
::;tradable: A string indicating the tradability status of the item, 1 if it can be traded or 0 otherwise.
  
:;type: The localized string used to display the type of the item or an empty string if not available.
+
::;fraudwarnings: An array of warnings that are displayed if the item can potentially be used to scam someone, for example a warning string indicating that an item has been renamed with a [[Name Tag]] in Team Fortress 2.
 +
:::;''N'': Where N<ref name="placeholdervar"/> is the index of the warning. Value is a localized warning string.
  
:;tradable: A string indicating the tradability status of the item, 1 if it can be traded or 0 otherwise.
+
::;descriptions: An array of attributes attached to the item. Will be an empty string if none is available.
 +
:::;''N'': Where ''N''<ref name="placeholdervar"/> is the index of the attribute given as a string.
 +
::::;type: The type of the attribute, includes '''text'''
 +
::::;value: The localized attribute value.
 +
::::;color: The RGB tuple of the attribute's description line as a hexadecimal value.
  
:;fraudwarnings: An array of warnings that are displayed if the item can potentially be used to scam someone, for example a warning string indicating that an item has been renamed with a [[Name Tag]] in Team Fortress 2.
+
::;actions: An array of links and their labels related to the item.
::;''N'': Where N is the index of the warning. Value is a localized warning string.
+
:::;''N'': Where ''N''<ref name="placeholdervar"/> is the index of the action.
 +
::::;name: The localized label of the link.
 +
::::;link: The URL to get more information about the item.
  
:;descriptions: An array of attributes attached to the item. Will be an empty string if none is available.
+
::;tags: An array of tags attached to the item.
::;''N'': Where ''N'' is the index of the attribute given as a string.
+
:::;''N''<ref name="placeholdervar"/>:
:::;type: The type of the attribute, includes '''text'''
+
::::;internal_name: Name of the tag used internally by software.
:::;value: The localized attribute value.
+
::::;name: User friendly name of the tag.
:::;color: The RGB tuple of the attribute's description line as a hexadecimal value.
+
::::;category_name: Internal name of the tag category.
 +
::::;category: User friendly category label.
 +
::::;color: The RGB tuple that should be used when displaying the tag's label.
  
:;actions: An array of links and their labels related to the item.
+
== Notes ==
::;''N'': Where ''N'' is the index of the action.
+
<references/>
:::;name: The localized label of the link.
 
:::;link: The URL to get more information about the item.
 
  
{{Languages|WebAPI/GetAssetClassInfo}}
 
 
[[Category:WebAPI|GetAssetClassInfo]]
 
[[Category:WebAPI|GetAssetClassInfo]]

Latest revision as of 04:20, 21 October 2014

URL

GET http://api.steampowered.com/ISteamEconomy/GetAssetClassInfo/v0001/

Method-specific Parameters

appid (uint32)
The ID of the game to query assets from.
language (Optional) (string)
The ISO639-1 language code for the language all localized strings should be returned in. Not all strings have been translated to every language. If a language does not have a string, the English string will be returned instead. If this parameter is omitted the string token will be returned for the strings.
class_count (uint32)
The number of classids passed to the request
classidN (uint64)
Where N can be a series of sequential numbers to form a list of class IDs. [1] [2]
instanceidN (Optional) (uint64)
Instance ID of the nth class.

Result Data

result
success
true if the query was successful, false otherwise.
classnumber
Where classnumber is a string corresponding to the given classidN[1] list.
icon_url
An encoded URL to be passed to http://cdn.steamcommunity.com/economy/image/<encoded url>
icon_url_large
An encoded URL similar to icon_url or an empty string if not available.
name
The localized name of the item.
name_color
The RGB tuple used for the item's name line color as a hexadecimal value.
background_color
The RGB tuple used for the item's cell background as a hexadecimal value.
type
The localized string used to display the type of the item or an empty string if not available.
tradable
A string indicating the tradability status of the item, 1 if it can be traded or 0 otherwise.
fraudwarnings
An array of warnings that are displayed if the item can potentially be used to scam someone, for example a warning string indicating that an item has been renamed with a Name Tag in Team Fortress 2.
N
Where N[1] is the index of the warning. Value is a localized warning string.
descriptions
An array of attributes attached to the item. Will be an empty string if none is available.
N
Where N[1] is the index of the attribute given as a string.
type
The type of the attribute, includes text
value
The localized attribute value.
color
The RGB tuple of the attribute's description line as a hexadecimal value.
actions
An array of links and their labels related to the item.
N
Where N[1] is the index of the action.
name
The localized label of the link.
link
The URL to get more information about the item.
tags
An array of tags attached to the item.
N[1]
internal_name
Name of the tag used internally by software.
name
User friendly name of the tag.
category_name
Internal name of the tag category.
category
User friendly category label.
color
The RGB tuple that should be used when displaying the tag's label.

Notes

  1. a b c d e f N refers to an incrementing ID starting from 0. For example: http://api.steampowered.com/ISteamEconomy/GetAssetClassInfo/v0001?key=APIKEY&format=json&language=en&appid=440&class_count=2&classid0=195151&classid1=16891096, with each consecutive classid incrementing from there.
  2. Currently only schema items have readily available class IDs. See GetAssetPrices