karol-szarafinowski / riot-games-api
Wrapper for Riot Games API
Installs: 23
Dependents: 0
Suggesters: 0
Security: 0
pkg:composer/karol-szarafinowski/riot-games-api
Requires
- php: >=7.2.0
This package is not auto-updated.
Last update: 2021-05-30 11:24:39 UTC
README
I am not endorsed by Riot Games and doesn't reflect the views or opinions of Riot Games or anyone officially involved in producing or managing League of Legends. League of Legends and Riot Games are trademarks or registered trademarks of Riot Games, Inc. League of Legends ©
Installation
$ composer require karol-szarafinowski/riot-games-api
Example
<?php
use KarolSzarafinowski\RiotGamesApi\LeagueOfLegendsApi;
use KarolSzarafinowski\RiotGamesApi\Server;
$api = new LeagueOfLegendsApi("API_KEY");
$summoner = $api->getSummonerByName(Server::EUROPE_EAST, "eška");
$code = $api->getSummonerThridPartyCode(Server::EUROPE_EAST, $summoner->id);
var_dump($summoner);
var_dump($code);
/*
RETURNS:
object(KarolSzarafinowski\RiotGamesApi\Structures\SummonerInfo)#123 (6) {
["id"]=>
int(35315624)
["accountId"]=>
int(40010417)
["name"]=>
string(5) "eška"
["profileIconId"]=>
int(616)
["revisionDate"]=>
int(1527456946000)
["summonerLevel"]=>
int(82)
}
string(12) "Unlucky.pl-2"
*/
Requirements
- PHP7.2+