2023-03-03 15:23:55 +01:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text.Json.Serialization;
|
2023-01-28 22:35:56 +01:00
|
|
|
|
|
2023-03-01 22:06:38 +01:00
|
|
|
|
namespace JpnCardsPokemon.Sdk.Api;
|
2023-01-28 23:54:23 +01:00
|
|
|
|
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Represents a card object from the web api.
|
|
|
|
|
/// </summary>
|
2023-03-01 21:47:26 +01:00
|
|
|
|
public class Card
|
2023-01-28 22:35:56 +01:00
|
|
|
|
{
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The name of the card.
|
|
|
|
|
/// </summary>
|
2023-01-28 23:54:23 +01:00
|
|
|
|
public string? Name { get; set; }
|
2023-01-28 22:35:56 +01:00
|
|
|
|
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The internal identification number that the card is given. Used to query for this single card.
|
|
|
|
|
/// </summary>
|
2023-01-28 22:35:56 +01:00
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Reduced information about the set the card belongs to.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>May contain basic information only. It´s recommended to fetch the fully <see cref="Set" /> separately.</remarks>
|
|
|
|
|
[JsonPropertyName("setData")]
|
|
|
|
|
public Set? Set { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The energy type of types the card is.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>Almost always will be a single value.</remarks>
|
2023-01-28 23:54:23 +01:00
|
|
|
|
public string[]? Types { get; set; }
|
2023-01-28 22:35:56 +01:00
|
|
|
|
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The amount of HP the card has.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>If the card does not have HP, the value will be -1.</remarks>
|
2023-01-28 22:35:56 +01:00
|
|
|
|
public int Hp { get; set; } = -1;
|
|
|
|
|
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// If the card evolves from another card, this field will denote the name of the pre-evolution.
|
|
|
|
|
/// </summary>
|
2023-01-28 22:35:56 +01:00
|
|
|
|
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; }
|
|
|
|
|
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Describes rules the card is bound to. Mainly for cards with a rule box and certain Trainers.
|
|
|
|
|
/// </summary>
|
2023-01-28 22:35:56 +01:00
|
|
|
|
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.
|
2023-03-03 17:49:56 +01:00
|
|
|
|
// public Resistance[]? Resistances { get; set; }
|
2023-01-28 22:35:56 +01:00
|
|
|
|
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// A list of known prices for this card.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>May contain entries from different sellers, versions and conditions.</remarks>
|
2023-03-03 15:23:55 +01:00
|
|
|
|
public IEnumerable<CardPrice>? Prices { get; set; }
|
|
|
|
|
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// List of the energies required to retreat.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonPropertyName("retreatCost")]
|
|
|
|
|
public string[]? RetreatCosts { get; set; }
|
2023-01-28 22:35:56 +01:00
|
|
|
|
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The total number of energies needed to retreat.
|
|
|
|
|
/// </summary>
|
2023-03-01 21:47:42 +01:00
|
|
|
|
public int? ConvertedRetreatCost { get; set; }
|
2023-01-28 22:35:56 +01:00
|
|
|
|
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The supertype the card is.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>Only possibilities are 'Pokemon', 'Trainer' or 'Energy'.</remarks>
|
2023-01-28 23:54:23 +01:00
|
|
|
|
public string? Supertype { get; set; }
|
2023-01-28 22:35:56 +01:00
|
|
|
|
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The subsets that the card falls into. For example 'Single Strike Pokemon', 'Pokemon VMAX', etc.
|
|
|
|
|
/// </summary>
|
2023-01-28 22:35:56 +01:00
|
|
|
|
public string[]? Subtypes { get; set; }
|
|
|
|
|
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The rarity of the card.
|
|
|
|
|
/// </summary>
|
2023-01-28 23:54:23 +01:00
|
|
|
|
public string? Rarity { get; set; }
|
2023-01-28 22:35:56 +01:00
|
|
|
|
|
|
|
|
|
// TODO: Type of property is not documented. Has to be evaluated at a later time.
|
|
|
|
|
// public Legality[]? Legalities { get; set; }
|
|
|
|
|
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The card art's artist.
|
|
|
|
|
/// </summary>
|
2023-01-29 01:18:22 +01:00
|
|
|
|
public string? Artist { get; set; }
|
|
|
|
|
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The url pointing to the card's image.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
|
|
|
|
/// If there is no card image, then this will instead point to
|
|
|
|
|
/// https://assets.tcgcollector.com/build/images/default-card-image.789f6232.png.
|
|
|
|
|
/// </remarks>
|
2023-01-28 22:35:56 +01:00
|
|
|
|
public string? ImageUrl { get; set; }
|
|
|
|
|
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The URL which leads to the original card URL data.
|
|
|
|
|
/// </summary>
|
2023-01-28 22:35:56 +01:00
|
|
|
|
public string? CardUrl { get; set; }
|
|
|
|
|
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The sequential number of the card (applicable to Secret Rares).
|
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonPropertyName("sequenceNumber")]
|
|
|
|
|
public int Number { get; set; }
|
2023-01-28 22:35:56 +01:00
|
|
|
|
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The number printed on the card. Will be the same as <see cref="Number" /> almost always. Is relevant for
|
|
|
|
|
/// promotional cards, such as SWSH001.
|
|
|
|
|
/// </summary>
|
2023-01-28 23:54:23 +01:00
|
|
|
|
public string? PrintedNumber { get; set; }
|
2023-01-28 22:35:56 +01:00
|
|
|
|
|
2023-03-03 17:49:56 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// A stable id for earch card. Output is an eight digit integer which is unique for each card. While the cards'
|
|
|
|
|
/// <see cref="Id" /> may change over time, the uuid should always remain stable and constant.
|
|
|
|
|
/// </summary>
|
2023-01-28 22:35:56 +01:00
|
|
|
|
public int Uuid { get; set; }
|
|
|
|
|
}
|