PHP code example of ta9to / php-riot-games-api

1. Go to this page and download the library: Download ta9to/php-riot-games-api 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/ */

    

ta9to / php-riot-games-api example snippets


use Ta9to\RiotGamesApi\GameConstant;

echo GameConstant::seasons();
// [{"id": 0, "season": "PRESEASON 3"}, {"id": 1, "season": "SEASON 3"}, ...

use Ta9to\RiotGamesApi\DataDragon;

echo DataDragon::versions();
// ["11.13.1","11.12.1","11.11.1","11.10.1","11.9.1","11.8.1","11.7.1","11.6.1"...

echo DataDragon::champion('11.13.1', 'en_US');
// {"type":"champion","format":"standAloneComplex","version":"11.13.1","data":{"Aatrox"...
shell
$ composer