This is the Pokémon TCG SDK C# implementation. It is a wrapper around the Pokémon TCG API of pokemontcg.io.
Install via NuGet
PM> Install-Package PokemonTcgSdk -Version 1.0.0
The following classes are available in the PokemonTcgSdk namespace
Card
Energy
Pokemon
Sets
SubTypes
SuperTypes
Trainer
Types
The following classes are available in the PokemonTcgSdk.Models namespace
Ability
AncientTrait
Attack
BaseCard
EnergyCard
PokemonCard
SetData
SubType
SuperType
TrainerCard
TypeData
Weakness
string Name
string Text
string Type
string Name
string Text
List<string> Cost
string Name
string Text
string Damage
int ConvertedEnergyCost
string Id
string Name
string ImageUrl
string ImageUrlHiRes
string SubType
string SuperType
string Number
string Artist
string Rarity
string Series
string Set
string SetCode
Inherits from BaseCard
List<string> Text
Inherits from BaseCard
int NationalPokedexNumber
string Hp
List<string> RetreatCost
Ability Ability
AncientTrait AncientTrait
List<string> Types
List<Attack> Attacks
List<Weakness> Weaknesses
List<Weakness> Resistances
string Code
string Name
string Series
int TotalCards
bool StandardLegal
bool ExpandedLegal
string ReleaseDate
List<string> Types
List<string> Types
Inherits from BaseCard
List<string> Text
List<string> Types
string Type
string Value
// Get a card via a query string
T Get<T>(Dictionary<string, string> query)
// Get a Pokemon card via a query string
Pokemon Get(Dictionary<string, string> query)
// Find a card by id
T Find<T>(string id)
// Get all Pokemon cards (will take awhile)
List<PokemonCard> All(Dictionary<string, string> query)
// Find a set via a query string
List<SetData> Find(Dictionary<string, string> query)
// Get all sets
List<SetData> All(Dictionary<string, string> query)
// Get all subtypes
List<string> All()
// Get all supertypes
List<string> All()
// Get all types
List<string> All()
// Get a default list of Trainer cards
var cards = Card.Get<Trainer>();
cards.Cards;
// Get a default list of Pokemon cards
var cards = Card.Get<Pokemon>();
cards.Cards;
// Get a default list of Energy cards
var cards = Card.Get<Energy>();
cards.Cards;
// Get a list of cards via a query string
Dictionary<string, string> query = new Dictionary<string, string>()
{
{ "name", "Charizard" },
{ "set", "Base" }
};
var cards = Card.Get(query);
cards.Cards;
// Get a Pokemon card by id
var card = Card.Find<Pokemon>("base4-4");
card.Card;
// Get a Trainer card by id
var card = Card.Find<Trainer>("xy7-79");
card.Card;
// Get all cards in a list
var cards = Card.All();
// Get a list of Sets via a query string
var query = new Dictionary<string, string>()
{
{ "standardLegal", true.ToString() }
};
var sets = Sets.Find(query);
// Get all Sets
var sets = Sets.All();
// Get all super/sub/types
var supertypes = SuperTypes.All();
var subtypes = SubTypes.All();
var types = Types.All();
- Fork it (click the Fork button at the top of the page)
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request