From 0561f514677fa644530b86fbfacb827d2d788f3d Mon Sep 17 00:00:00 2001 From: Serraniel Date: Sat, 28 Jan 2023 22:35:56 +0100 Subject: [PATCH] Adds basic classes for card and set Covers most of the properties documented at https://jpn-cards-site.readthedocs.io/en/latest/api_docs/pokemon/v2/v2_obj/ Properties which consist of undocumented objects currently are not implemented. --- src/Api/Card.cs | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ src/Api/Set.cs | 27 +++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 src/Api/Card.cs create mode 100644 src/Api/Set.cs diff --git a/src/Api/Card.cs b/src/Api/Card.cs new file mode 100644 index 0000000..63715f0 --- /dev/null +++ b/src/Api/Card.cs @@ -0,0 +1,53 @@ +namespace JpnCardsPokemonSdk.Api; + +public class Card +{ + public string Name { get; set; } + + public int Id { get; set; } + + public Set? Set { get; set; } + + public string[] Types { get; set; } + + public int Hp { get; set; } = -1; + + public string? EvolvesFrom { get; set; } + + // TODO: Type of property is not documented. Has to be evaluated at a later time. + // public Effect? Effect { get; set; } + + // TODO: Type of property is not documented. Has to be evaluated at a later time. + // public Attack[]? Attacks { get; set; } + + public string[]? Rules { get; set; } + + // TODO: Type of property is not documented. Has to be evaluated at a later time. + // public Weakness[]? Weaknesses { get; set; } + + // TODO: Type of property is not documented. Has to be evaluated at a later time. + // public Resistance[]? Ressistences { get; set; } + + public string[]? RetreatCosts { get; set; } + + public int? ConvertedRetreadCost { get; set; } + + public string Supertype { get; set; } + + public string[]? Subtypes { get; set; } + + public string Rarity { get; set; } + + // TODO: Type of property is not documented. Has to be evaluated at a later time. + // public Legality[]? Legalities { get; set; } + + public string? ImageUrl { get; set; } + + public string? CardUrl { get; set; } + + public int Number { get; set; } + + public string PrintedNumber { get; set; } + + public int Uuid { get; set; } +} \ No newline at end of file diff --git a/src/Api/Set.cs b/src/Api/Set.cs new file mode 100644 index 0000000..18f8ee5 --- /dev/null +++ b/src/Api/Set.cs @@ -0,0 +1,27 @@ +namespace JpnCardsPokemonSdk.Api; + +public class Set +{ + public string Name { get; set; } + + public int Id { get; set; } + + public string? SourceUrl { get; set; } + + public string? ImageUrl { get; set; } + + public string Language { get; set; } + + public int Year { get; set; } + + // TODO: According to documentation the property currently is not supported. + // public DateOnly? Date { get; set; } + + public int TotalCardCount { get; set; } + + public int PrintedCardCount { get; set; } + + public string SetCode { get; set; } + + public int Uuid { get; set; } +} \ No newline at end of file