TcgDex.CSharpSdk

Beta

A .NET SDK for the TCGdex Pokémon TCG API — strongly typed models, a fluent query builder, and first-class Native AOT support.

Platforms
.NET 8, .NET 10, netstandard2.0, .NET Framework 4.6.1+
Built with
C#, .NET, NuGet, Native AOT

Install

dotnet add package TcgDex.CSharpSdk

A client library for TCGdex, the free public Pokémon TCG API. Strongly typed models, a fluent query builder covering the full REST filter syntax, and first-class support for dependency injection, trimming, and Native AOT.

No API key required — TCGdex is free, public, and read-only.

Why 0.1 and not 1.0

The package is on NuGet and the API is complete enough to use, but the version is deliberately 0.x. Under semantic versioning, 1.0 is a promise that the public contracts are frozen — every breaking change after it costs a major version. Shipping 0.1 first buys room to find anything that was missed without having to publish a 2.0 to correct it.

Reach

Targets .NET 8, .NET 10, and netstandard2.0, so it runs on modern .NET and on .NET Framework 4.6.1 and up. The API surface is identical on every target, async included.

Unity is a supported target by construction rather than by test: the netstandard2.0 assembly contains no runtime code generation, no Expression.Compile(), and no reflection-based serialization, and a Native AOT publish exercises the one reflective path under full trimming. Nobody has run it inside a Unity project yet — the repo documents what’s verified and what isn’t.

One difference worth knowing

Connection recycling — which keeps a long-lived client from pinning stale DNS — uses SocketsHttpHandler on modern .NET and ServicePoint.ConnectionLeaseTimeout on .NET Framework. Same guarantee, different mechanism. Response cancellation mid-body is best-effort on netstandard2.0, because the cancellable HttpContent read overloads don’t exist there.

← All programs