1

Using the Steam Web API I load my trade partners inventory which returns an array filled with objects like this:

{ id: '2063512233',
  classid: '520025252',
  instanceid: '0',
  amount: '1',
  pos: 2,
  appid: '730',
  icon_url: 'fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZYMUrsm1j-9xgEObwgfEgznuShMhvflDOGJG68Didsh4K9W1jtmhA9yIPqKZHlhIgCQUvgKBKBoowq7CyJi7pZlV47jou0EeFrs4dGQYbEtOdsZSsTQRLbYMa0PH-14',
  icon_drag_url: '',
  name: 'Operation Breakout Weapon Case',
  market_hash_name: 'Operation Breakout Weapon Case',
  market_name: 'Operation Breakout Weapon Case',
  name_color: 'D2D2D2',
  background_color: '',
  type: 'Base Grade Container',
  tradable: 1,
  marketable: 1,
  commodity: 1,
  descriptions:
   [ { type: 'html', value: ' ' },
     { type: 'html', value: 'Container Series #18', color: '99ccff' },
     { type: 'html', value: ' ' },
     { type: 'html', value: 'Contains one of the following:' },
     { type: 'html', value: 'MP7 | Urban Hazard', color: '4b69ff' },
     { type: 'html', value: 'Negev | Desert-Strike', color: '4b69ff' },
     { type: 'html', value: 'P2000 | Ivory', color: '4b69ff' },
     { type: 'html', value: 'SSG 08 | Abyss', color: '4b69ff' },
     { type: 'html', value: 'UMP-45 | Labyrinth', color: '4b69ff' },
     { type: 'html', value: 'PP-Bizon | Osiris', color: '8847ff' },
     { type: 'html', value: 'CZ75-Auto | Tigris', color: '8847ff' },
     { type: 'html', value: 'Nova | Koi', color: '8847ff' },
     { type: 'html', value: 'P250 | Supernova', color: '8847ff' },
     { type: 'html',
       value: 'Desert Eagle | Conspiracy',
       color: 'd32ce6' },
     { type: 'html',
       value: 'Five-SeveN | Fowl Play',
       color: 'd32ce6' },
     { type: 'html',
       value: 'Glock-18 | Water Elemental',
       color: 'd32ce6' },
     { type: 'html', value: 'P90 | Asiimov', color: 'eb4b4b' },
     { type: 'html', value: 'M4A1-S | Cyrex', color: 'eb4b4b' },
     { type: 'html',
       value: 'or an Exceedingly Rare Butterfly Knife!',
       color: 'ffd700' },
     { type: 'html', value: ' ' },
     { type: 'html', value: '', color: '00a000', app_data: [Object] } ],
  tags:
   [ { internal_name: 'CSGO_Type_WeaponCase',
       name: 'Container',
       category: 'Type',
       category_name: 'Type' },
     { internal_name: 'set_community_4',
       name: 'The Breakout Collection',
       category: 'ItemSet',
       category_name: 'Collection' },
     { internal_name: 'normal',
       name: 'Normal',
       category: 'Quality',
       category_name: 'Category' },
     { internal_name: 'Rarity_Common',
       name: 'Base Grade',
       category: 'Rarity',
       color: 'b0c3d9',
       category_name: 'Quality' } ],
  contextid: 2 
}

Which is fine and works great, my only problem is when I want to render the icon of the item on the site, I'm not sure what kind of prefix to link to the icon_url. After reading through the Web API a few more times I can't really find anything on what the full URL is supposed to look like. If anybody can help that'd be grrrreeaatt. Thanks!

Datsik
  • 14,453
  • 14
  • 80
  • 121

1 Answers1

3

Put http://cdn.steamcommunity.com/economy/image/ in front of it.

Source: google

liamness
  • 742
  • 3
  • 5
  • 1
    I'll choose as the answer when the time limit is up, would you mind linking me whatever link you came across? – Datsik Apr 08 '15 at 19:08