php-mtg/mtg-api-com-mtgjson-object

A library that implements the php-mtg/mtg-api-com-mtgjson-interface library


README

A library that implements the php-mtg/mtg-api-com-mtgjson-interface library.

coverage build status

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-mtgjson-object ^7

Basic Usage

This library may be used the following way :


use PhpMtg\Mtgjson\MtgjsonComApiEndpoint;

/* @var $client \Psr\Http\Client\ClientInterface */

$endpoint = new MtgjsonComApiEndpoint($client);

$collection = $this->_endpoint->getSetList();

foreach($collection->getSets() as $setResume)
{
	/** @var \PhpMtg\Mtgjson\MtgjsonComApiSetMetaInterface $meta */
	$meta = $this->_endpoint->getSet($setResume->getCode());
	
	$set = $meta->getSet();
	// do something to set
}

License

MIT (See license file).