TCGdex Rust SDK
A fast, robust, and type-safe Rust SDK for the TCGdex API. Query Pokuรฉmon Trading Card Game data with ease. ๐ฆ
use ;
async
โก๏ธ Quick Install
Add to your Cargo.toml:
[]
= "0.1.0"
Or use cargo add:
๐ Features
- Type-Safe: Full type safety with Rust's strong type system
- Async/Await: Built for modern Rust applications
- Zero Config: Works out of the box
- Multi-Language: Support for English, French, German, Japanese, Chinese, and more
- Rich Data: Access cards, sets, series, rarities, and more
- Error Handling: Comprehensive error handling with thiserror
- Testable: Unit and integration tests included
๐ฏ Quick Examples
Find Cards by Various Criteria
use ;
async
Working with Sets and Series
use ;
async
Working with Card Images
use ;
use File;
use Write;
async
๐ Available Endpoints
Card Data
tcgdex.card // Core card data
tcgdex.rarity // Card rarities
tcgdex.hp // HP values
tcgdex.illustrator // Card illustrators
Game Mechanics
tcgdex.type_ // Pokรฉmon types
tcgdex.energy_type // Energy types
tcgdex.retreat // Retreat costs
tcgdex.stage // Evolution stages
Card Details
tcgdex.variant // Card variants
tcgdex.suffix // Card suffixes
tcgdex.regulation_mark // Regulation marks
tcgdex.dex_id // Pokรฉdex IDs
Collections
tcgdex.set // Card sets
tcgdex.serie // Card series
๐ Language Support
use ;
// Using enum (type-safe)
let tcgdex = new; // English
let tcgdex = new; // French
// After creating the instance you can change the language
let mut tcgdex = default; // Default is EN
tcgdex.set_language;
Full list of languages available in the Language enum
๐ Query Building
The SDK provides a powerful query builder for filtering API results:
use ;
async
๐ค Contributing
We love contributions! Here's how:
- ๐ด Fork it
- ๐ฟ Create your feature branch (
git checkout -b feature/amazing) - ๐ง Make your changes
- ๐ Push to the branch (
git push origin feature/amazing) - ๐ Open a PR
๐ Documentation
๐ฌ Community & Support
- Discord Server - Get help and discuss features
- GitHub Issues - Bug reports and feature requests
๐ License
MIT ยฉ TCGdex