cardtechie/tradingcardapi-sdk-php
A PHP SDK for the Trading Card API that makes it easy to search cards, fetch card details, and integrate trading card data into Laravel or any PHP app with a clean, simple client. Ideal for building card databases, marketplaces, and collection tools.
Architecture fit
cardtechie/tradingcardapi-sdk-php is a thin REST SDK for the Trading Card API, distributed via Composer and explicitly compatible with Laravel 9–12 on PHP ^8.1. It fits a Laravel application as a vendor SDK consumed through a service provider/facade rather than as a first-class Laravel package with deep framework coupling.api_key auth mode for portal-issued tc_ keys. This is architecturally significant because it introduces a split auth model: tc_ keys are read-only, while write operations and any Internal\ calls still require OAuth. The integration therefore has two credential paths to configure, test, and operate.Integration feasibility
^0.3.4), and configuration is environment-driven (TRADINGCARDAPI_API_KEY) or programmatic (TradingCardApi::withApiKey()).api_key mode is additive. Existing OAuth-based integrations should continue to function, and the release notes disclose no removals or breaking changes. The README now documents the legacy PAT auth mode, which suggests three possible auth postures in the wild (OAuth, legacy PAT, portal tc_ key) and a corresponding documentation/support burden.tc_ keys with limited blast radius; read-write workloads must run a dual-credential configuration and route calls carefully.Technical risk
tc_ key used on a write or Internal\ path will fail at runtime, not at configuration time. Without explicit capability checks in application code, this surfaces as production errors rather than deployment-time validation.tc_ keys, or a deprecation timeline for legacy PAT auth.Key questions
tc_ keys?tc_ keys, and who owns it?Stack fit
.env configuration, config caching, queue workers, and containerized runtimes.Migration path
^0.3.4 and commit the lockfile. Do not use a floating constraint.TRADINGCARDAPI_API_KEY in the environment configuration, with distinct values per environment (local, staging, production) and secret-manager injection in deployed environments.Internal\ operations. Do not remove the OAuth path during this change.Compatibility
Sequencing
^0.3.4 in a non-production environment; confirm existing OAuth flows are unaffected.tc_ key in a sandbox/staging environment; validate read operations and observe error behavior on a deliberately attempted write.tc_ key.api_key mode enabled only for read paths; keep OAuth as the default for anything else.Maintenance
Support
tc_ key is used on an unsupported call.Scaling
Failure modes
tc_ key used on a write or Internal\ call → authorization error at runtime.TRADINGCARDAPI_API_KEY or an un-cached config change → authentication failure across all read paths.Ramp-up
How can I help you explore Laravel packages today?