3

Here is the part of the XML that the API returns for every item:

<message>
    <appid>730</appid>
    <classid>469467368</classid>
    <instanceid>302028390</instanceid>
    <currency>false</currency>
    <background_color/>
    <icon_url>
    -9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou6ryFA957PfMYTxW09SzlZaS2aX3MOvSlzlQucdy2LqU9NmnjAzl_UJoYmqldYSTIQI_NV_X81bvkufxxcjryPo2vmI
    </icon_url>
</message>

How do I parse and convert this string to an URL?

Thanks!

Reynevan
  • 1,475
  • 1
  • 18
  • 35

1 Answers1

4

I've never used this Api. I searched on google and i came on this answer: Steam Web API: I'm not sure what to do with this hash looking url to generate an image with it. It seems you just need to prepend the http://cdn.steamcommunity.com/economy/image/ before the url string.

The image link in your case should be: http://cdn.steamcommunity.com/economy/image/-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou6ryFA957PfMYTxW09SzlZaS2aX3MOvSlzlQucdy2LqU9NmnjAzl_UJoYmqldYSTIQI_NV_X81bvkufxxcjryPo2vmI

Community
  • 1
  • 1
Stefano Castriotta
  • 2,823
  • 3
  • 16
  • 26