TCGDex 0.1.0

dotnet add package TCGDex --version 0.1.0
                    
NuGet\Install-Package TCGDex -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TCGDex" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TCGDex" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="TCGDex" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TCGDex --version 0.1.0
                    
#r "nuget: TCGDex, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TCGDex@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TCGDex&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=TCGDex&version=0.1.0
                    
Install as a Cake Tool

TCGDex .NET SDK

.NET SDK for the TCGDex API — a REST API for Pokemon TCG collectors.

Requirements

  • .NET 10.0 SDK

Installation

From NuGet (when published):

dotnet add package TCGDex

Or in your .csproj:

<PackageReference Include="TCGDex" Version="0.1.0" />

From source:

<ProjectReference Include="path\to\TCGDex\TCGDex.csproj" />

Quick Start

using TCGDex;

// Create client (default language: English)
var client = new TCGDexClient(SupportedLanguages.En);

// List all series
var series = await client.FetchSeriesAsync();
foreach (var s in series)
    Console.WriteLine("{0} ({1})", s.Name, s.Id);

// List sets (optionally filtered by series)
var sets = await client.FetchSetsAsync();

// Get a set by id
var set = await client.FetchSetAsync("swsh12");
Console.WriteLine("Set: {0}, Cards: {1}", set?.Name, set?.Cards?.Count);

// Get a card by global id or by set + local id
var card = await client.FetchCardAsync("swsh12-1");
// or: await client.FetchCardAsync("1", "swsh12");

// Use endpoints directly
var cardById = await client.Cards.GetAsync("swsh12-1");
var setsList = await client.Sets.ListAsync(Query.Create().Paginate(1, 10));

// Random card / set / series
var randomCard = await client.Random.GetRandomCardAsync();

Configuration

  • Language: Set via constructor or client.Lang = SupportedLanguages.Pt.
  • Base URL: client.EndpointUrl = "https://api.tcgdex.net/v2".
  • Cache: Replace client.Cache with a custom ITCGDexCache implementation.
  • Cache TTL: client.CacheTTL = 3600 (seconds).

Query Builder

Filter and sort list results with the fluent Query API:

var query = Query.Create()
    .Equal("rarity", "Rare")
    .Sort("name", SortOrder.Asc)
    .Paginate(1, 20);
var cards = await client.Cards.ListAsync(query);

Project Structure

  • src/TCGDex/ — Main SDK library (namespace TCGDex).
  • src/TCGDex.Console/ — Sample console application.
  • tests/TCGDex.Tests/ — Unit and integration tests.

All interfaces use the I prefix (e.g. ICard, ISet, ISerieResume). TCG is always uppercase in type and namespace names.

Creating and publishing the NuGet package

Manual

From the repository root:

dotnet pack src/TCGDex/TCGDex.csproj -c Release -o ./nupkgs

This produces nupkgs/TCGDex.0.1.0.nupkg (and optionally a .snupkg for symbols). To publish to NuGet.org:

dotnet nuget push nupkgs/TCGDex.0.1.0.nupkg --api-key YOUR_API_KEY --source https://api.nuget.org/v3/index.json

GitHub Actions

The workflow .github/workflows/ci.yml runs tests on every push and pull request. It publishes to NuGet.org when:

  1. A GitHub Release is published — Create a release (e.g. v0.1.0) and the package will be packed and pushed automatically.
  2. Manual run — Go to Actions → CI and Publish → Run workflow.

Add the NUGET_API_KEY secret in your repository settings (Settings → Secrets and variables → Actions) with your NuGet.org API key.

License

See repository license.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 95 3/2/2026