PHP code example of simivar / riot-php

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

    

simivar / riot-php example snippets




Client = new \Symfony\Component\HttpClient\Psr18Client();
$connection = new \Riot\Connection(
    $httpClient,
    'PASTE-YOUR-API-KEY-HERE',
    $httpClient,
    $httpClient
);
$riotApi = new \Riot\API($connection);
$lolStatus = $riotApi->getVersion4()
    ->getLolStatus()
    ->getPlatformData(\Riot\Enum\RegionEnum::EUN1())
    ;

composer