php-mtg / mtg-api-com-scryfall-object
A library that implements the php-mtg/mtg-api-com-scryfall-interface
7.0.6
2024-12-11 00:25 UTC
Requires
Requires (Dev)
- dev-master
- 7.0.6
- 7.0.5
- 7.0.4
- 7.0.3
- 7.0.2
- 7.0.1
- 7.0.0
- 6.1.12
- 6.1.11
- 6.1.10
- 6.1.9
- 6.1.8
- 6.1.7
- 6.1.6
- 6.1.5
- 6.1.4
- 6.1.3
- 6.1.2
- 6.1.1
- 6.1.0
- 6.0.0
- 5.0.2
- 5.0.1
- 5.0.0
- 4.0.2
- 4.0.1
- 4.0.0
- 3.3.11
- 3.3.10
- 3.3.9
- 3.3.8
- 3.3.7
- 3.3.6
- 3.3.5
- 3.3.4
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.1
- 3.2.0
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.29
- 3.0.28
- 3.0.27
- 3.0.26
- 3.0.25
- 3.0.24
- 3.0.23
- 3.0.22
- 3.0.21
- 3.0.20
- 3.0.19
- 3.0.18
- 3.0.17
- 3.0.16
- 3.0.15
- 3.0.14
- 3.0.13
- 3.0.12
- 3.0.11
- 3.0.10
- 3.0.9
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
This package is auto-updated.
Last update: 2024-12-10 23:26:05 UTC
README
A library that implements the php-mtg/mtg-api-com-scryfall-interface.
Installation
The installation of this library is made via composer and the autoloading of all classes of this library is made through their autoloader.
- Download
composer.phar
from their website. - Then run the following command to install this library as dependency :
php composer.phar php-mtg/mtg-api-com-scryfall-object ^7
Basic Usage
This library may be used the following way :
use PhpMtg\Scryfall\ScryfallApiEndpoint;
/* @var $client \Psr\Http\Client\ClientInterface */
$endpoint = new ScryfallApiEndpoint($client);
$collection = $endpoint->getSets();
foreach($collection as $set)
{
$page = 1;
do
{
/** @var \PhpMtg\Scryfall\ScryfallApiPagination $pagination */
$pagination = $endpoint->getCardsSearch($page, 'e='.$set->getId());
foreach($pagination->getData() as $card)
{
// do something with $card
}
$page++;
}
while($pagination->hasMore());
}
License
MIT (See license file).