Steam Web API:I'我不知道该如何处理这个看起来像哈希的url来生成图像

Steam Web API: I'm not sure what to do with this hash looking url to generate an image with it

本文关键字:看起来 哈希 图像 url 处理 API Web 何处理 我不知道 Steam      更新时间:2023-09-26

使用Steam Web API,我加载我的贸易伙伴库存,该库存返回一个数组,其中包含以下对象:

{ 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 
}

这很好,效果也很好,我唯一的问题是,当我想在网站上呈现项目的图标时,我不确定链接到icon_url的前缀是什么。在阅读了Web API几次之后,我真的找不到完整的URL应该是什么样子。如果有人能帮忙,那就太好了。谢谢

http://cdn.steamcommunity.com/economy/image/放在其前面。

来源:谷歌