Advertisement
Guest User

Comparison of TF2 WebAPI and Steam Inventory API results

a guest
Apr 26th, 2021
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 5.43 KB | None | 0 0
  1. Comparison between TF2 WebAPI and Steam Inventory API results for a unique Your
  2. Eternal Reward in an F2P backpack. Comments added by me indicated by a #.
  3.  
  4. ================================================================================
  5.  
  6. TF2 WebAPI:
  7.  
  8. {
  9.     "id": 10042989175,
  10.     "original_id": 10042989175,
  11.     "defindex": 225,            # ID of Your Eternal Reward in TF2 item schema
  12.     "level": 1,
  13.     "quality": 6,               # 6 means Unique
  14.     "inventory": 2147483675,    # specifies position in backpack
  15.     "quantity": 1,
  16.     "origin": 0,                # 0 means Timed Drop
  17.     "equipped": [               # Player has this equipped in loadout
  18.         {
  19.             "class": 8,
  20.             "slot": 2
  21.         }
  22.     ],
  23.     "attributes": [
  24.         {
  25.             "defindex": 796,    # Viewmodel offset when using minmode
  26.             "value": "5 0 -4"
  27.         },
  28.         {
  29.             "defindex": 154,    # "disguise on backstab"
  30.             "value": 1065353216,
  31.             "float_value": 1
  32.         },
  33.         {
  34.             "defindex": 156,    # "silent killer"
  35.             "value": 1065353216,
  36.             "float_value": 1
  37.         },
  38.         {
  39.             "defindex": 144,    # "lunchbox adds minicrits" (???)
  40.             "value": 1065353216,
  41.             "float_value": 1
  42.         },
  43.         {
  44.             "defindex": 551,    # "special taunt"
  45.             "value": 1065353216,
  46.             "float_value": 1
  47.         },
  48.         {
  49.             "defindex": 34,     # increased cloak drain rate
  50.             "value": 1068121457,
  51.             "float_value": 1.3300000429153442
  52.         },
  53.         {
  54.             "defindex": 816,    # disguise requires a full cloak meter
  55.             "value": 1065353216,
  56.             "float_value": 1
  57.         }
  58.     ]
  59. },
  60.  
  61. ================================================================================
  62.  
  63. Steam Inventory API result is actually returned in two parts. First part is very
  64. short, second part has the rest of the information. This is because fetching
  65. part 2 is optional, in case for whatever reason an application only needs item
  66. IDs and not much else.
  67.  
  68. Part 1:
  69.  
  70. {
  71.     "appid": 440,
  72.     "contextid": "2",
  73.     "assetid": "10042989175",       # same as "id" in TF2 WebAPI
  74.     "classid": "156",               # specifies Your Eternal Reward ?
  75.     "instanceid": "23967790",       # not sure, but together with classid this specifies the item description in part 2
  76.     "amount": "1"
  77. },
  78.  
  79. Part 2:
  80.  
  81. {
  82.     "appid": 440,
  83.     "classid": "156",
  84.     "instanceid": "23967790",
  85.     "currency": 0,
  86.     "background_color": "3C352E",
  87.     "icon_url": "fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZULUrsm1j-9xgEIUwIFWAnsuTR8ms3xDOCIN-wBid0wq8INjWQ9lwMoNbq3aTQzcQfGU6EOCaI_rQm_UHFlupY6A4Hvoe1XfAnx9NyR6XUuLuY",
  88.     "icon_url_large": "fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZULUrsm1j-9xgEIUwIFWAnsuTR8ms3xDOCIN-wBid0wq8INjWQ9lwMoNbq3aTQzcQfGU6EOCaI_rQm_UHFlupY6A4Hvoe1XfAnx9NyR6XUuLuY",
  89.     "descriptions": [
  90.         {
  91.             "value": "Upon a successful backstab against a human target, you rapidly disguise as your victim",
  92.             "color": "7ea9d1"
  93.         },
  94.         {
  95.             "value": "Silent Killer: No attack noise from backstabs",
  96.             "color": "7ea9d1"
  97.         },
  98.         {
  99.             "value": "+33% cloak drain rate",
  100.             "color": "d83636"
  101.         },
  102.         {
  103.             "value": "Normal disguises require (and consume) a full cloak meter",
  104.             "color": "d83636"
  105.         },
  106.         {
  107.             "value": " "
  108.         },
  109.         {
  110.             "value": "The Saharan Spy",
  111.             "color": "e1e10f"
  112.         },
  113.         {
  114.             "value": " "
  115.         },
  116.         {
  117.             "value": "L'Etranger",
  118.             "color": "8b8989"
  119.         },
  120.         {
  121.             "value": "Your Eternal Reward",
  122.             "color": "8b8989"
  123.         },
  124.         {
  125.             "value": "Familiar Fez",
  126.             "color": "8b8989"
  127.         },
  128.         {
  129.             "value": " "
  130.         },
  131.         {
  132.             "value": "Item Set Bonus:",
  133.             "color": "e1e10f"
  134.         },
  135.         {
  136.             "value": "Extra effects when taunting",
  137.             "color": "8b8989"
  138.         },
  139.         {
  140.             "value": " "
  141.         },
  142.         {
  143.             "value": "( Not Tradable or Marketable )"
  144.         }
  145.     ],
  146.     "tradable": 0,                          # not tradable!
  147.     "actions": [
  148.         {
  149.             "link": "http://wiki.teamfortress.com/scripts/itemredirect.php?id=225&lang=en_US",
  150.             "name": "Item Wiki Page..."
  151.         }
  152.     ],
  153.     "name": "Your Eternal Reward",
  154.     "name_color": "7D6D00",
  155.     "type": "Level 1 Knife",
  156.     "market_name": "Your Eternal Reward",
  157.     "market_hash_name": "Your Eternal Reward",
  158.     "commodity": 0,
  159.     "market_tradable_restriction": 7,
  160.     "market_marketable_restriction": 0,
  161.     "marketable": 0,
  162.     "tags": [                               # this seems to be where any game-specific information has to be put
  163.         {
  164.             "category": "Quality",
  165.             "internal_name": "Unique",
  166.             "localized_category_name": "Quality",
  167.             "localized_tag_name": "Unique",
  168.             "color": "7D6D00"
  169.         },
  170.         {
  171.             "category": "Type",
  172.             "internal_name": "melee",
  173.             "localized_category_name": "Type",
  174.             "localized_tag_name": "Melee weapon"
  175.         },
  176.         {
  177.             "category": "Class",
  178.             "internal_name": "Spy",
  179.             "localized_category_name": "Class",
  180.             "localized_tag_name": "Spy"
  181.         }
  182.     ]
  183. },
  184.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement