Download the PHP package communitydragon/phizz without Composer
On this page you can find all versions of the php package communitydragon/phizz. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download communitydragon/phizz
More information about communitydragon/phizz
Files in communitydragon/phizz
Package phizz
Short Description An auto-generated PHP library for Riot API
License MIT
Homepage https://github.com/communitydragon/phizz
Informations about the package phizz
Phizz — Laravel client for the Riot Games API
A type-safe, auto-generated Laravel client for the Riot Games API. Covers League of Legends, Teamfight Tactics, Legends of Runeterra, Valorant, and Riftbound — generated directly from official OpenAPI schemas with built-in caching, proactive rate limiting, and automatic regional routing.
Requirements
- PHP
>= 8.1 - Laravel
>= 10
Installation
Publish the config file:
Add your Riot API key to .env:
Usage
Access APIs through the Phizz facade. Each game exposes its own client.
Bypassing the cache
Every API method accepts a force parameter. When true, the request always hits the network and the cache is skipped entirely — nothing is read from it and nothing is written to it.
Caching
Caching is enabled by default and uses your application's default cache store. The TTL applied to each response is resolved in this order:
- Per-method override in
config/phizz.phpundercache.method[] - Global default (
cache.default, 60 seconds)
Per-method TTLs are configured using the TTL class, which provides a chained constant syntax:
Sane defaults for all endpoints across every game are shipped in the published config.
Retry strategy
Phizz automatically retries on 429 responses. Two built-in strategies are available:
When a Retry-After header is present in the 429 response, Phizz always respects it over the configured strategy.
Rate limiting
Phizz tracks Riot's X-App-Rate-Limit and X-Method-Rate-Limit response headers and sleeps proactively before sending requests that would otherwise trigger a 429. Rate limit state is stored in the configured cache store and scoped per platform and endpoint.
Platforms & regions
Endpoints that require a regional host (e.g. match history) automatically convert a Platform to the correct Regional value — Platform::EUW becomes Regional::Europe transparently.
Supported APIs
Cross-game (riot)
| API | Version |
|---|---|
| Account | V1 |
League of Legends (lol)
| API | Version |
|---|---|
| Challenges | V1 |
| Champion Mastery | V4 |
| Champion | V3 |
| Clash | V1 |
| League EXP | V4 |
| League | V4 |
| Match | V5 |
| RSO Match | V1 |
| Spectator | V5 |
| Status | V4 |
| Summoner | V4 |
| Tournament Stub | V5 |
| Tournament | V5 |
Teamfight Tactics (tft)
| API | Version |
|---|---|
| League | V1 |
| Match | V1 |
| Spectator | V5 |
| Status | V1 |
| Summoner | V1 |
Valorant (val)
| API | Version |
|---|---|
| Console Match | V1 |
| Console Ranked | V1 |
| Content | V1 |
| Match | V1 |
| Ranked | V1 |
| Status | V1 |
Legends of Runeterra (lor)
| API | Version |
|---|---|
| Deck | V1 |
| Inventory | V1 |
| Match | V1 |
| Ranked | V1 |
| Status | V1 |
Riftbound (riftbound)
| API | Version |
|---|---|
| Content | V1 |
Configuration reference
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Sandi Karajic
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of phizz with dependencies
ext-intl Version *
guzzlehttp/guzzle Version ^7.0
illuminate/contracts Version ^10.0||^11.0||^12.0
illuminate/support Version ^10.0||^11.0||^12.0
spatie/laravel-package-tools Version ^1.0