public async Task <DataTable> GetDataTableAsync(DataTableGeneration dataTableGeneration)
        {
            HttpClient httpClient = new HttpClient();
            string     content    = await httpClient.GetStringAsync("https://api.steampowered.com/ISteamApps/GetAppList/v2/");

            SteamGames steamGames = JsonConvert.DeserializeObject <SteamGames>(content);

            DataTable dt = new DataTable();

            dt.Columns.Add("Name", typeof(String));
            dt.Columns.Add("AppId", typeof(int));

            foreach (var item in steamGames.Applist.Apps)
            {
                dt.Rows.Add(item.Name, item.Appid);
            }

            dataTableGeneration.DataTableToGenerate = dt;
            return(dt);
        }
Ejemplo n.º 2
0
 public static int ToInt(SteamGames methods)
 {
     return(MethodAsKey[methods]);
 }
Ejemplo n.º 3
0
 public async Task <SteamPricing> GetAllAsync(SteamGames steamGames)
 {
     return(await _repository.GetAsync(steamGames));
 }