Difference between revisions of "WebAPI/GetPlayerItems"
< WebAPI
(Undo edit by RocketRacer (Talk) (443781)) |
RocketRacer (talk | contribs) (→Status Codes) |
||
Line 12: | Line 12: | ||
: The 64 bit ID of the user the backpack will be retrieved for. | : The 64 bit ID of the user the backpack will be retrieved for. | ||
− | = | + | = Статусный Код = |
− | *'''<tt>1</tt>''': OK. | + | *'''<tt>1</tt>''': OK. Данные вернутся как показано ниже. |
− | *'''<tt>8</tt>''' ("<tt>SteamID | + | *'''<tt>8</tt>''' ("<tt>SteamID параметр отсутствует.</tt>"): URL параметра "steamID" небыли включены, или если присутствует не является допустимым значением SteamID64. |
− | *'''<tt>15</tt>''' ("<tt> | + | *'''<tt>15</tt>''' ("<tt>Доступ запрещен</tt>"): Профиль игрока был изменен на "Приватный". |
= Result Data = | = Result Data = |
Revision as of 17:04, 4 April 2011
This method returns the specified player's backpack content.
This documentation is for version v0001 of GetPlayerItems.
URL
http://api.steampowered.com/ITFItems_440/GetPlayerItems/v0001/
Method-specific Parameters
- SteamID
- The 64 bit ID of the user the backpack will be retrieved for.
Статусный Код
- 1: OK. Данные вернутся как показано ниже.
- 8 ("SteamID параметр отсутствует."): URL параметра "steamID" небыли включены, или если присутствует не является допустимым значением SteamID64.
- 15 ("Доступ запрещен"): Профиль игрока был изменен на "Приватный".
Result Data
A list of the player's items is returned, as follows:
- num_backpack_slots
- The number of backpack slots this user has.
- items
- An object containing an unsorted array of
- item
-
- id
- The unique ID of the specific item.
- defindex
- The defindex of the item, as found in the item array returned from GetSchema.
- level
- The arbitrary "level" value of the item as displayed in the inventory.
- quantity
- How many of this item in the backpack, since all non-normal items have a unique ID this is always 1.
- flag_cannot_trade
- A boolean value that is true if the item cannot be traded. This is true for items granted by an Achievement, purchased items, and certain promotional items.
- inventory
- An inventory token as described here, or 0 if the item has been awarded but not yet found (placed in the backpack).
- quality
- The quality of the item (see definition in GetSchema).
- custom_name (Optional)
- The item's custom name if it has one.
- custom_desc (Optional)
- The item's custom description if it has one.
- contained_item (Optional)
- All the information for the item that this item contains for gift-wrapped items.
- attributes (Optional)
- If the item has additional effects to the ones normally associated with it as described in GetSchema, an object containing an array of
- attribute
-
- defindex
- The index to the attributes definition in the schema. (eg. 133 for the medal number attribute for the Gentle Manne's Service Medal).
- value
- The value for this attribute for this item (eg. the medal number for the Gentle Manne's Service Medal).
- float_value (Optional)
- The floating point value for this attribute if it has one.
Inventory Token
The inventory token is a combination of class loadout flags and position in the player's backpack. This unsigned 32 bit number is split into two two-byte words. The high word contains flags for each class. A 1 bit in a class's slot indicates that the items is equipped in the appropriate loadout slot for that class. The low word contains the backback position with 0 being the upper left slot, 1 the second slot from the left on the top row, etc. Here it is visually:
┌─────────────────────────────────────────────────────────────── Always 1 │ ┌─┬─┬─┬─┬─┬─────────────────────────────────────────────────── Unused │ │ │ │ │ │ │ ┌───────────────────────────────────────────────── Engineer │ │ │ │ │ │ │ │ ┌─────────────────────────────────────────────── Spy │ │ │ │ │ │ │ │ │ ┌───────────────────────────────────────────── Pyro │ │ │ │ │ │ │ │ │ │ ┌─────────────────────────────────────────── Heavy │ │ │ │ │ │ │ │ │ │ │ ┌───────────────────────────────────────── Medic │ │ │ │ │ │ │ │ │ │ │ │ ┌─────────────────────────────────────── Demoman │ │ │ │ │ │ │ │ │ │ │ │ │ ┌───────────────────────────────────── Soldier │ │ │ │ │ │ │ │ │ │ │ │ │ │ ┌─────────────────────────────────── Sniper │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ┌───────────────────────────────── Scout │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─ Backpack Position │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Examples:
1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 Equipped Pyro item in backback slot 9 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 Unequipped item in backback slot 41 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 Equipped by Pyro and Engy in backback slot 42
Languages: | English |