1. Go to this page and download the library: Download ypho/scryfall library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ypho / scryfall example snippets
$client = new Ypho\Scryfall\Client();
// Get the Endpoint
$setEndpoint = $client->sets();
$setEndpoint->all(); // Returns an array with Set-objects
$setEndpoint->get('mmq'); // Returns a single Set-object of the Mercadian Masques set
$cardEndpoint = $client->cards();
$cardEndpoint->get('0038ea4d-d0a6-44a4-bee6-24c03313d2bc'); // Returns a Card-object of Sphinx's Revelation (MM3 version)
$cardEndpoint->allCardsInSet('mm3'); // Returns an array with Card-objects for all cards in MM3
$symbologyEndpoint = $client->symbology();
$symbologyEndpoint->all(); // Returns an array with all Symbol-objects
$symbologyEndpoint->parseMana('RG'); // Returns a ManaCost-object
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.