Created models forTCGdex Service to scrape data
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace OakArchive.Models.TcgDex;
|
||||
|
||||
public class Attack
|
||||
{
|
||||
[JsonPropertyName("cost")]
|
||||
public List<string>? Cost { get; set; }
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
[JsonPropertyName("effect")]
|
||||
public string? Effect { get; set; }
|
||||
|
||||
[JsonPropertyName("damage")]
|
||||
public int? Damage { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using OakArchive.Entities.Set;
|
||||
|
||||
namespace OakArchive.Models.TcgDex;
|
||||
|
||||
public class Card
|
||||
{
|
||||
[JsonPropertyName("category")]
|
||||
public string? Category { get; set; }
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public string? Id { get; set; }
|
||||
|
||||
[JsonPropertyName("illustrator")]
|
||||
public string? Illustrator { get; set; }
|
||||
|
||||
[JsonPropertyName("image")]
|
||||
public string? Image { get; set; }
|
||||
|
||||
[JsonPropertyName("localId")]
|
||||
public int? LocalId { get; set; }
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
[JsonPropertyName("rarity")]
|
||||
public string? Rarity { get; set; }
|
||||
|
||||
[JsonPropertyName("set")]
|
||||
public Entities.Set.Set? Set { get; set; }
|
||||
|
||||
[JsonPropertyName("variants")]
|
||||
public Variants? Variants { get; set; }
|
||||
|
||||
[JsonPropertyName("hp")]
|
||||
public int? Hp { get; set; }
|
||||
|
||||
[JsonPropertyName("types")]
|
||||
public List<string>? Types { get; set; }
|
||||
|
||||
[JsonPropertyName("evolveFrom")]
|
||||
public string? EvolveFrom { get; set; }
|
||||
|
||||
[JsonPropertyName("description")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
[JsonPropertyName("stage")]
|
||||
public string? Stage { get; set; }
|
||||
|
||||
[JsonPropertyName("attacks")]
|
||||
public List<Attack>? Attacks { get; set; }
|
||||
|
||||
[JsonPropertyName("weaknesses")]
|
||||
public List<Weakness>? Weaknesses { get; set; }
|
||||
|
||||
[JsonPropertyName("retreat")]
|
||||
public int? Retreat { get; set; }
|
||||
|
||||
[JsonPropertyName("regulationMark")]
|
||||
public string? RegulationMark { get; set; }
|
||||
|
||||
[JsonPropertyName("legal")]
|
||||
public Legal? Legal { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace OakArchive.Models.TcgDex;
|
||||
|
||||
public class CardCount
|
||||
{
|
||||
[JsonPropertyName("firstEd")]
|
||||
public int? FirstEd { get; set; }
|
||||
|
||||
[JsonPropertyName("holo")]
|
||||
public int? Holo { get; set; }
|
||||
|
||||
[JsonPropertyName("normal")]
|
||||
public int? Normal { get; set; }
|
||||
|
||||
[JsonPropertyName("official")]
|
||||
public int? Official { get; set; }
|
||||
|
||||
[JsonPropertyName("reverse")]
|
||||
public int? Reverse { get; set; }
|
||||
|
||||
[JsonPropertyName("total")]
|
||||
public int? Total { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace OakArchive.Models.TcgDex;
|
||||
|
||||
public class Legal
|
||||
{
|
||||
[JsonPropertyName("standard")]
|
||||
public bool? Standard { get; set; }
|
||||
|
||||
[JsonPropertyName("expanded")]
|
||||
public bool? Expanded { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace OakArchive.Models.TcgDex;
|
||||
|
||||
public class Serie
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public string? Id { get; set; }
|
||||
|
||||
[JsonPropertyName("logo")]
|
||||
public string? Logo { get; set; }
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
[JsonPropertyName("sets")]
|
||||
public List<SetBrief>? Sets { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace OakArchive.Models.TcgDex;
|
||||
|
||||
public class SerieBrief
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
public string? Id { get; set; }
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
[JsonPropertyName("logo")]
|
||||
public string? Logo { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace OakArchive.Models.TcgDex;
|
||||
|
||||
public class Set
|
||||
{
|
||||
[JsonPropertyName("cardCount")]
|
||||
public CardCount CardCount { get; set; }
|
||||
|
||||
[JsonPropertyName("cards")]
|
||||
public List<Card> Cards { get; set; }
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonPropertyName("legal")]
|
||||
public Legal Legal { get; set; }
|
||||
|
||||
[JsonPropertyName("logo")]
|
||||
public string Logo { get; set; }
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonPropertyName("releaseDate")]
|
||||
public DateTime ReleaseDate { get; set; }
|
||||
|
||||
[JsonPropertyName("serie")]
|
||||
public Serie Serie { get; set; }
|
||||
|
||||
[JsonPropertyName("symbol")]
|
||||
public string Symbol { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace OakArchive.Models.TcgDex;
|
||||
|
||||
public class SetBrief
|
||||
{
|
||||
[JsonPropertyName("cardCount")]
|
||||
public CardCount? CardCount { get; set; }
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public string? Id { get; set; }
|
||||
|
||||
[JsonPropertyName("logo")]
|
||||
public string? Logo { get; set; }
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
[JsonPropertyName("symbol")]
|
||||
public string? Symbol { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace OakArchive.Models.TcgDex;
|
||||
|
||||
public class Variants
|
||||
{
|
||||
[JsonPropertyName("firstEdition")]
|
||||
public bool? FirstEdition { get; set; }
|
||||
|
||||
[JsonPropertyName("holo")]
|
||||
public bool? Holo { get; set; }
|
||||
|
||||
[JsonPropertyName("normal")]
|
||||
public bool? Normal { get; set; }
|
||||
|
||||
[JsonPropertyName("reverse")]
|
||||
public bool? Reverse { get; set; }
|
||||
|
||||
[JsonPropertyName("wPromo")]
|
||||
public bool? WPromo { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user