Skip to content

RzWilliam/yu-gi-oh-scrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yu-Gi-Oh Card Scrapper

The Yu-Gi-Oh Card Scrapper is a PHP library that provides functions to retrieve information about Yu-Gi-Oh trading cards. It allows you to fetch a list of card names and retrieve the image of a specific card.

Installation

You can install the library using Composer. Run the following command in your project directory:

composer require rzwilliam/td3

Local

composer install
php vendor/bin/phpstan analyse src --level=max
php vendor/bin/phpunit tests

Usage

Retrieving a List of Card Names

To retrieve a list of all card names, use the GetAllCardsName function. This function accepts optional parameters to specify the start and end page numbers for fetching the cards. By default, it will retrieve cards from page 1 to page 143.

$api = new Api();
$cardNames = $api->GetAllCardsName();

Retrieving the Image of a Card

To retrieve the image of a specific card, use the GetCardImage function. Pass the name of the card as the parameter, and it will return an array with the card's name and image URL.

$api = new Api();
$cardName = 'Blue-Eyes White Dragon';
$cardDetails = $api->GetCardImage($cardName);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages