auto-creamapi-2/auto-creamapi/Models/SteamAppModel.cs
Jeddunk 73baa27245 SearchResultView and DownloadView implemented;
Ignore whitespaces and special chars when looking for games;
2020-12-28 15:27:37 +01:00

33 lines
784 B
C#

using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace auto_creamapi.Models
{
public class SteamApp
{
[JsonPropertyName("appid")] public int AppId { get; set; }
[JsonPropertyName("name")] public string Name { get; set; }
public override string ToString()
{
//return $"AppId: {AppId}, Name: {Name}";
return $"{AppId}={Name}";
}
public bool CompareId(SteamApp steamApp)
{
return AppId.Equals(steamApp.AppId);
}
}
public class AppList
{
[JsonPropertyName("apps")] public List<SteamApp> Apps { get; set; }
}
public class SteamApps
{
[JsonPropertyName("applist")] public AppList AppList { get; set; }
}
}