Add project files.
This commit is contained in:
19
LeagueAPI/Models/DDragon/ChampionResponse.cs
Normal file
19
LeagueAPI/Models/DDragon/ChampionResponse.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using LeagueAPI.Models.DDragon.Champions;
|
||||
|
||||
namespace LeagueAPI.Models.DDragon;
|
||||
|
||||
public record class ChampionResponse
|
||||
{
|
||||
[JsonPropertyName("type")]
|
||||
public string? Type { get; init; }
|
||||
|
||||
[JsonPropertyName("format")]
|
||||
public string? Format { get; init; }
|
||||
|
||||
[JsonPropertyName("version")]
|
||||
public string? Version { get; init; }
|
||||
|
||||
[JsonPropertyName("data")]
|
||||
public Dictionary<string, ChampionData>? Data { get; init; }
|
||||
}
|
||||
42
LeagueAPI/Models/DDragon/Champions/ChampionData.cs
Normal file
42
LeagueAPI/Models/DDragon/Champions/ChampionData.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
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; }
|
||||
}
|
||||
27
LeagueAPI/Models/DDragon/Champions/ChampionDataImage.cs
Normal file
27
LeagueAPI/Models/DDragon/Champions/ChampionDataImage.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace LeagueAPI.Models.DDragon.Champions;
|
||||
|
||||
public record ChampionDataImage
|
||||
{
|
||||
[JsonPropertyName("full")]
|
||||
public string? Full { get; init; }
|
||||
|
||||
[JsonPropertyName("sprite")]
|
||||
public string? Sprite { get; init; }
|
||||
|
||||
[JsonPropertyName("group")]
|
||||
public string? Group { get; init; }
|
||||
|
||||
[JsonPropertyName("x")]
|
||||
public int X { get; init; }
|
||||
|
||||
[JsonPropertyName("y")]
|
||||
public int Y { get; init; }
|
||||
|
||||
[JsonPropertyName("w")]
|
||||
public int W { get; init; }
|
||||
|
||||
[JsonPropertyName("h")]
|
||||
public int H { get; init; }
|
||||
}
|
||||
18
LeagueAPI/Models/DDragon/Champions/ChampionDataInfo.cs
Normal file
18
LeagueAPI/Models/DDragon/Champions/ChampionDataInfo.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace LeagueAPI.Models.DDragon.Champions;
|
||||
|
||||
public record ChampionDataInfo
|
||||
{
|
||||
[JsonPropertyName("attack")]
|
||||
public int Attack { get; init; }
|
||||
|
||||
[JsonPropertyName("defense")]
|
||||
public int Defense { get; init; }
|
||||
|
||||
[JsonPropertyName("magic")]
|
||||
public int Magic { get; init; }
|
||||
|
||||
[JsonPropertyName("difficulty")]
|
||||
public int Difficulty { get; init; }
|
||||
}
|
||||
66
LeagueAPI/Models/DDragon/Champions/ChampionDataStats.cs
Normal file
66
LeagueAPI/Models/DDragon/Champions/ChampionDataStats.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace LeagueAPI.Models.DDragon.Champions;
|
||||
|
||||
public record ChampionDataStats
|
||||
{
|
||||
[JsonPropertyName("hp")]
|
||||
public float Hp { get; init; }
|
||||
|
||||
[JsonPropertyName("hpperlevel")]
|
||||
public float HpPerLevel { get; init; }
|
||||
|
||||
[JsonPropertyName("mp")]
|
||||
public float Mp { get; init; }
|
||||
|
||||
[JsonPropertyName("mpperlevel")]
|
||||
public float MpPerLevel { get; init; }
|
||||
|
||||
[JsonPropertyName("movespeed")]
|
||||
public float Movespeed { get; init; }
|
||||
|
||||
[JsonPropertyName("armor")]
|
||||
public float Armor { get; init; }
|
||||
|
||||
[JsonPropertyName("armorperlevel")]
|
||||
public float ArmorPerLevel { get; init; }
|
||||
|
||||
[JsonPropertyName("spellblock")]
|
||||
public float Spellblock { get; init; }
|
||||
|
||||
[JsonPropertyName("spellblockperlevel")]
|
||||
public float SpellblockPerLevel { get; init; }
|
||||
|
||||
[JsonPropertyName("attackrange")]
|
||||
public float AttackRange { get; init; }
|
||||
|
||||
[JsonPropertyName("hpregen")]
|
||||
public float HpRegen { get; init; }
|
||||
|
||||
[JsonPropertyName("hpregenperlevel")]
|
||||
public float HpRegenPerLevel { get; init; }
|
||||
|
||||
[JsonPropertyName("mpregen")]
|
||||
public float MpRegen { get; init; }
|
||||
|
||||
[JsonPropertyName("mpregenperlevel")]
|
||||
public float MpRegenPerLevel { get; init; }
|
||||
|
||||
[JsonPropertyName("crit")]
|
||||
public float Crit { get; init; }
|
||||
|
||||
[JsonPropertyName("critperlevel")]
|
||||
public float CritPerLevel { get; init; }
|
||||
|
||||
[JsonPropertyName("attackdamage")]
|
||||
public float AttackDamage { get; init; }
|
||||
|
||||
[JsonPropertyName("attackdamageperlevel")]
|
||||
public float AttackDamagePerLevel { get; init; }
|
||||
|
||||
[JsonPropertyName("attackspeedperlevel")]
|
||||
public float AttackspeedPerLevel { get; init; }
|
||||
|
||||
[JsonPropertyName("attackspeed")]
|
||||
public float Attackspeed { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user