TCGDex 0.1.0
dotnet add package TCGDex --version 0.1.0
NuGet\Install-Package TCGDex -Version 0.1.0
<PackageReference Include="TCGDex" Version="0.1.0" />
<PackageVersion Include="TCGDex" Version="0.1.0" />
<PackageReference Include="TCGDex" />
paket add TCGDex --version 0.1.0
#r "nuget: TCGDex, 0.1.0"
#:package TCGDex@0.1.0
#addin nuget:?package=TCGDex&version=0.1.0
#tool nuget:?package=TCGDex&version=0.1.0
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.Cachewith a customITCGDexCacheimplementation. - 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 (namespaceTCGDex).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:
- A GitHub Release is published — Create a release (e.g. v0.1.0) and the package will be packed and pushed automatically.
- 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 | Versions 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. |
-
net10.0
- Microsoft.Extensions.Caching.Memory (>= 9.0.0)
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 |