43 lines
1016 B
C#
43 lines
1016 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace LeagueAPI.Models.DDragon.Champions;
|
|
|
|
public record ChampionData
|
|
{
|
|
[JsonPropertyName("version")]
|
|
public string? Version { get; init; }
|
|
|
|
[JsonPropertyName("id")]
|
|
public string? IdName { get; init; }
|
|
|
|
[JsonIgnore]
|
|
public int Id => Key?.ParseInt(-1) ?? -1;
|
|
|
|
[JsonPropertyName("key")]
|
|
public string? Key { get; init; }
|
|
|
|
[JsonPropertyName("name")]
|
|
public string? Name { get; init; }
|
|
|
|
[JsonPropertyName("title")]
|
|
public string? Title { get; init; }
|
|
|
|
[JsonPropertyName("blurb")]
|
|
public string? Blurb { get; init; }
|
|
|
|
[JsonPropertyName("info")]
|
|
public ChampionDataInfo? Info { get; init; }
|
|
|
|
[JsonPropertyName("image")]
|
|
public ChampionDataImage? Image { get; init; }
|
|
|
|
[JsonPropertyName("tags")]
|
|
public string[]? Tags { get; init; }
|
|
|
|
[JsonPropertyName("partype")]
|
|
public string? Partype { get; init; }
|
|
|
|
[JsonPropertyName("stats")]
|
|
public ChampionDataStats? Stats { get; init; }
|
|
}
|