japanese-pokemon-cards-sdk-.../JpnCardsPokemon.Sdk/Api/Set.cs

34 lines
1.1 KiB
C#
Raw Normal View History

using System.Text.Json.Serialization;
2023-03-01 22:06:38 +01:00
using JpnCardsPokemon.Sdk.Utils.JsonConverter;
2023-03-01 22:06:38 +01:00
namespace JpnCardsPokemon.Sdk.Api;
public class Set
{
public string? Name { get; set; }
public int Id { get; set; }
2023-03-01 21:47:42 +01:00
[JsonPropertyName("source_url")] public string? SourceUrl { get; set; }
2023-03-01 21:47:42 +01:00
[JsonPropertyName("image_url")] public string? ImageUrl { get; set; }
public string? Language { get; set; }
[JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)]
[JsonConverter(typeof(NoneIntJsonConverter))] // set hashes in card objects sometimes have "none" as year.
public int Year { get; set; }
// TODO: According to documentation the property currently is not supported.
// public DateOnly? Date { get; set; }
2023-03-01 21:47:42 +01:00
[JsonPropertyName("card_count")] public int TotalCardCount { get; set; }
[JsonPropertyName("printed_count")]
2023-03-01 21:47:42 +01:00
[JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)]
public int PrintedCardCount { get; set; }
2023-03-01 21:47:42 +01:00
[JsonPropertyName("set_code")] public string? SetCode { get; set; }
public int Uuid { get; set; }
}