Skip to content

tcgdex/php-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0922961 · Jan 14, 2025

History

56 Commits
Jan 14, 2025
Jan 14, 2025
Jun 22, 2021
Jan 14, 2025
Jan 14, 2025
Jun 21, 2021
Dec 15, 2021
Jun 22, 2021
Dec 15, 2021
Dec 15, 2021
Jun 21, 2021
Jun 22, 2024
Jun 25, 2024
Dec 12, 2024
Jun 21, 2021
Jun 21, 2021
Jan 14, 2025

Repository files navigation

TCGdex Main Image

Packagist Version NPM Downloads npm version the TCGdex PHP SDK is released under the MIT license. the TCGdex PHP SDK's automated builds. Discord Link

TCGdex PHP SDK

This is the SDK used to communicate with the Open source TCGdex API using PHP

Full API/SDK documentation in progress here

Getting Started

install the SDK using:

composer require tcgdex/sdk
# if you have no PSR 16/17/18 implementations add the following packages
composer require symfony/cache nyholm/psr7 kriswallsmith/buzz
# they will be automaticly setup for the project
# symfony/cache      === PSR16
# nyholm/psr7        === PSR17
# kriswallsmith/buzz === PSR18

Quick usage

use TCGdex\TCGdex;

// Is you are using your own PSRs implementations add theses before loading the class
TCGdex::$cache = /* PSR16 CacheInterface */;
TCGdex::$requestFactory = /* PSR17 RequestFactoryInterface */;
TCGdex::$responseFactory = /* PSR17 ResponseFactoryInterface */;
TCGdex::$client = /* PSR18 ClientInterface */;

// initialize the SDK with the language
$tcgdex = new TCGdex("en");

// Fetch the cards !
$card = $tcgdex->fetchCard('1', 'Sword & Shield');