2021-01-08 12:36:57 -05:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Text.Json.Serialization;
|
2021-03-21 10:20:46 -04:00
|
|
|
using SQLite;
|
2021-01-08 12:36:57 -05:00
|
|
|
|
|
|
|
// ReSharper disable UnusedMember.Global
|
|
|
|
// ReSharper disable ClassNeverInstantiated.Global
|
|
|
|
// ReSharper disable CollectionNeverUpdated.Global
|
|
|
|
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
|
|
|
// ReSharper disable StringLiteralTypo
|
|
|
|
// ReSharper disable InconsistentNaming
|
|
|
|
namespace GoldbergGUI.Core.Models
|
|
|
|
{
|
2021-03-21 10:20:46 -04:00
|
|
|
[Table("steamapp")]
|
2021-01-08 12:36:57 -05:00
|
|
|
public class SteamApp
|
|
|
|
{
|
2021-03-21 10:20:46 -04:00
|
|
|
[JsonPropertyName("appid")]
|
|
|
|
[Column("appid")]
|
|
|
|
[PrimaryKey]
|
|
|
|
public int AppId { get; set; }
|
2021-01-08 12:36:57 -05:00
|
|
|
|
2021-02-17 08:27:54 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Name of Steam app
|
|
|
|
/// </summary>
|
2021-01-08 12:36:57 -05:00
|
|
|
[JsonPropertyName("name")]
|
2021-03-21 10:20:46 -04:00
|
|
|
[Column("name")]
|
2021-03-21 10:53:56 -04:00
|
|
|
public string Name { get; set; }
|
2021-03-21 10:20:46 -04:00
|
|
|
|
|
|
|
[Column("comparable_name")]
|
2021-03-21 10:53:56 -04:00
|
|
|
public string ComparableName { get; set; }
|
2021-01-13 12:57:10 -05:00
|
|
|
|
2021-02-17 08:27:54 -05:00
|
|
|
/// <summary>
|
|
|
|
/// App type (Game, DLC, ...)
|
|
|
|
/// </summary>
|
2021-03-21 10:20:46 -04:00
|
|
|
[Column("type")]
|
|
|
|
public string type { get; set; }
|
2021-01-08 12:36:57 -05:00
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
{
|
|
|
|
return $"{AppId}={Name}";
|
|
|
|
}
|
2021-01-13 12:57:10 -05:00
|
|
|
|
2021-03-21 10:20:46 -04:00
|
|
|
[JsonPropertyName("last_modified")]
|
|
|
|
[Ignore]
|
|
|
|
public long LastModified { get; set; }
|
2021-01-13 12:57:10 -05:00
|
|
|
|
|
|
|
[JsonPropertyName("price_change_number")]
|
2021-03-21 10:20:46 -04:00
|
|
|
[Ignore]
|
2021-01-13 12:57:10 -05:00
|
|
|
public long PriceChangeNumber { get; set; }
|
2021-01-08 12:36:57 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
public class AppList
|
|
|
|
{
|
|
|
|
[JsonPropertyName("apps")] public List<SteamApp> Apps { get; set; }
|
2021-01-13 12:57:10 -05:00
|
|
|
|
|
|
|
[JsonPropertyName("have_more_results")]
|
|
|
|
public bool HaveMoreResults { get; set; }
|
|
|
|
|
|
|
|
[JsonPropertyName("last_appid")] public long LastAppid { get; set; }
|
2021-01-08 12:36:57 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
public class SteamApps
|
|
|
|
{
|
2021-01-13 12:57:10 -05:00
|
|
|
public virtual AppList AppList { get; set; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public class SteamAppsV2 : SteamApps
|
|
|
|
{
|
|
|
|
[JsonPropertyName("applist")] public override AppList AppList { get; set; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public class SteamAppsV1 : SteamApps
|
|
|
|
{
|
|
|
|
[JsonPropertyName("response")] public override AppList AppList { get; set; }
|
2021-01-08 12:36:57 -05:00
|
|
|
}
|
|
|
|
}
|