karol-szarafinowski/riot-games-api

This package is abandoned and no longer maintained. No replacement package was suggested.

Wrapper for Riot Games API

4.0.0 2019-01-31 18:08 UTC

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+

License

MIT License