YgoProDeck.Lib 1.0.2

dotnet add package YgoProDeck.Lib --version 1.0.2
                    
NuGet\Install-Package YgoProDeck.Lib -Version 1.0.2
                    
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="YgoProDeck.Lib" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="YgoProDeck.Lib" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="YgoProDeck.Lib" />
                    
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 YgoProDeck.Lib --version 1.0.2
                    
#r "nuget: YgoProDeck.Lib, 1.0.2"
                    
#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 YgoProDeck.Lib@1.0.2
                    
#: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=YgoProDeck.Lib&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=YgoProDeck.Lib&version=1.0.2
                    
Install as a Cake Tool

YgoProDeck.Lib

A lightweight, strongly-typed, and asynchronous .NET client library for the YGOPRODeck API v7.

NuGet

Installation

Install via the .NET CLI:

dotnet add package YgoProDeck.Lib

Or via Package Manager Console:

Install-Package YgoProDeck.Lib

Quick Start

Search for cards by fuzzy name with pagination and additional metadata:

using System;
using System.Threading.Tasks;
using YgoProDeck.Lib.EnumValue;
using YgoProDeck.Lib.Query;
using YgoProDeck.Lib.Response;

QueryParameters query = new() {
    FuzzyName = "Dark Magician",
    Language = Language.English,
    Number = 5,
    Offset = 0,
    Misc = true // Includes release dates, formats, views, and more
};

CardInfoRequester requester = new(query);
CardInfo? result = await requester.RequestAsync();

if (result?.Data is { Count: > 0 } cards) {
    foreach (CardData card in cards) {
        Console.WriteLine($"[{card.Id}] {card.Name} | {card.Type} | ATK: {card.Atk ?? 0} / DEF: {card.Def ?? 0}");
        Console.WriteLine($"Image: {card.CardImages[0].ImageUrl}");
    }
}

2. Advanced Filtering (Attributes, Types & Numeric Comparisons)

Filter cards using strongly-typed attributes and numeric comparisons (e.g., Level 8+ DARK Dragons with ATK $\ge$ 3000):

using YgoProDeck.Lib.EnumValue;
using YgoProDeck.Lib.Query;
using YgoProDeck.Lib.Response;

QueryParameters query = new() {
    Attribute = [MonsterAttribute.Dark],
    Race = [Race.Dragon],
    Level = (8, ValueCompare.GreaterThanOrEqual),
    ATK = (3000, ValueCompare.GreaterThanOrEqual),
    Format = Format.TCG,
    Sort = Sort.ATK
};

CardInfoRequester requester = new(query);
CardInfo? result = await requester.RequestAsync();

foreach (var card in result?.Data ?? []) {
    Console.WriteLine($"{card.Name} - ATK: {card.Atk}, DEF: {card.Def}, Level: {card.Level}");
}

3. Exact Lookup by Passcode or Name

Lookup specific cards directly by 8-digit passcode or exact card names:

// Lookup by 8-digit passcode (e.g., Blue-Eyes White Dragon: 89631139)
QueryParameters queryById = new() {
    ID = [89631139]
};

// Or lookup by exact card name(s)
QueryParameters queryByName = new() {
    Name = ["Ash Blossom & Joyous Spring", "Effect Veiler"]
};

CardInfo? result = await new CardInfoRequester(queryById).RequestAsync();
Console.WriteLine(result?.Data.FirstOrDefault()?.Desc);

4. Error Handling & Pagination Metadata

using System.Net.Http;

QueryParameters query = new() {
    Archetype = "Blue-Eyes",
    Number = 10,
    Offset = 0
};

try {
    CardInfoRequester requester = new(query);
    CardInfo? result = await requester.RequestAsync();

    if (result?.Meta is { } meta) {
        Console.WriteLine($"Total cards found: {meta.TotalRows} (Page: {meta.TotalPages - meta.PagesRemaining}/{meta.TotalPages})");
    }
}
catch (HttpRequestException ex) {
    // Thrown if the card was not found (400 Bad Request) or network failure occurs
    Console.WriteLine($"Request failed: {ex.Message}");
}

Data Source & Attribution

Data is retrieved from the YGOPRODeck API. Please review their API terms of service and rate limits when using this library.

License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.
  • net8.0

    • No dependencies.

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
1.0.2 98 9/10/2026
1.0.1 94 9/9/2026