json-nan / laravel-riot-lol-api
Package to facilitate the connection with the Riot Games API in LOL
Fund package maintenance!
Jasson López
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.0
- illuminate/contracts: ^10.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- larastan/larastan: ^2.0.1
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8
- orchestra/testbench: ^8.8
- pestphp/pest: ^2.20
- pestphp/pest-plugin-arch: ^2.5
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
This package is auto-updated.
Last update: 2024-04-29 07:23:33 UTC
README
This package is a wrapper for the Riot Games API in League of Legends, it is designed to facilitate the connection with the API and to be able to use the data in a more friendly way.
Requirements
- PHP 8.2 or higher
- Laravel 10 or higher
- Riot Games API Key from Riot Games Developer
Features
- Get Summoner info
- Get Player account info
Installation
You can install the package via composer:
composer require json-nan/laravel-riot-lol-api
You can publish the config file with:
php artisan vendor:publish --tag="laravel-riot-lol-api-config"
Configuration
It requires the following environment variables:
RIOT_LOL_API_KEY=
You can configure this optional environment variable:
RIOT_LOL_API_DOMAIN=
RIOT_LOL_REGION=
RIOT_LOL_PLATFORM=
RIOT_LOL_DATA_DRAGON_VERSION=
Usage
use JsonNaN\LaravelRiotLolApi\LaravelRiotLolApi; $riotApi = new LaravelRiotLolApi(); $riotApi->getPlayerAccountByRiotId("Name#TAG")
Testing
For testing the library in your local environment you need to follow the next steps:
- Go to tests/RiotLolApiTest.php
- Fill the configuration variables from line 12 to 16
- Remove ->skip() from the line 17
- Run ./vendor/bin/pest
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.