0

I am recently working on a C # program and I want to get the price of games, names, etc. through steam api, and in this way I used rest sharp to get json I also used https://json2csharp.com to convert json to c # But as you know, to access each game page, we must have the game app id Like the following:

https://store.steampowered.com/api/appdetails?appids=916840

And the problem is that app id was used at the beginning of the api, and if it is not, it will not be able to access the rest of the elements I wanted to see how I should put the desired app id in the classes and change it every time?

Because it is not just a matter of a game or program And multiple app ids are to be used for the application So the class needs to change as well

I used Google Translate, I apologize if I wrote wrong

These are my root class codes :

public class _916840
{
    public bool success { get; set; }
    public Data data { get; set; }
}

public class Root
{
    public _916840 _916840 { get; set; }
}

enter image description here

IcyMaster
  • 13
  • 2
  • Deserialize to a Dictionary – Cid Dec 18 '21 at 17:18
  • It is a not-so-uncommon problem, having weird json property names and trying to get it working. There are several similar questions, like [this one](https://stackoverflow.com/questions/37917164/newtonsoft-json-dynamic-property-name), maybe it helps you. – Cleptus Dec 18 '21 at 18:00

0 Answers0