Sets JsonPropertyNames for JSON conversion on properties with altered names
This commit is contained in:
parent
e5680743e6
commit
b6f59a7733
|
@ -1,4 +1,5 @@
|
|||
using JpnCardsPokemonSdk.Client.Endpoints;
|
||||
using System.Text.Json.Serialization;
|
||||
using JpnCardsPokemonSdk.Client.Endpoints;
|
||||
|
||||
namespace JpnCardsPokemonSdk.Api;
|
||||
|
||||
|
@ -8,6 +9,7 @@ public class Card : EndpointObject
|
|||
|
||||
public int Id { get; set; }
|
||||
|
||||
[JsonPropertyName("setData")]
|
||||
public Set? Set { get; set; }
|
||||
|
||||
public string[]? Types { get; set; }
|
||||
|
@ -30,6 +32,7 @@ public class Card : EndpointObject
|
|||
// TODO: Type of property is not documented. Has to be evaluated at a later time.
|
||||
// public Resistance[]? Ressistences { get; set; }
|
||||
|
||||
[JsonPropertyName("retreatCost")]
|
||||
public string[]? RetreatCosts { get; set; }
|
||||
|
||||
public int? ConvertedRetreadCost { get; set; }
|
||||
|
@ -43,10 +46,15 @@ public class Card : EndpointObject
|
|||
// TODO: Type of property is not documented. Has to be evaluated at a later time.
|
||||
// public Legality[]? Legalities { get; set; }
|
||||
|
||||
public string? Artist { get; set; }
|
||||
|
||||
[JsonPropertyName("image_url")]
|
||||
public string? ImageUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("card_url")]
|
||||
public string? CardUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("sequenceNumber")]
|
||||
public int Number { get; set; }
|
||||
|
||||
public string? PrintedNumber { get; set; }
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using JpnCardsPokemonSdk.Client.Endpoints;
|
||||
using System.Text.Json.Serialization;
|
||||
using JpnCardsPokemonSdk.Client.Endpoints;
|
||||
|
||||
namespace JpnCardsPokemonSdk.Api;
|
||||
|
||||
|
@ -8,8 +9,10 @@ public class Set : EndpointObject
|
|||
|
||||
public int Id { get; set; }
|
||||
|
||||
[JsonPropertyName("source_url")]
|
||||
public string? SourceUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("image_url")]
|
||||
public string? ImageUrl { get; set; }
|
||||
|
||||
public string? Language { get; set; }
|
||||
|
@ -19,10 +22,13 @@ public class Set : EndpointObject
|
|||
// TODO: According to documentation the property currently is not supported.
|
||||
// public DateOnly? Date { get; set; }
|
||||
|
||||
[JsonPropertyName("card_count")]
|
||||
public int TotalCardCount { get; set; }
|
||||
|
||||
[JsonPropertyName("printed_count")]
|
||||
public int PrintedCardCount { get; set; }
|
||||
|
||||
[JsonPropertyName("set_code")]
|
||||
public string? SetCode { get; set; }
|
||||
|
||||
public int Uuid { get; set; }
|
||||
|
|
Loading…
Reference in a new issue