PSR-18 compliant package for the VALORANT API by Riot.
The match endpoints have been written blind, as I don't have access to the VALORANT API yet.
The only resource I've been able to use is some sample JSON from Riot Tuxedo in the Riot Dev Discord server.
Every DTO from the Match resource has been generated based on this JSON, so it may not be accurate, nor have every type set correctly.
Requires PHP 7.4 as it takes advantage of its type support.
Install via composer:
composer require team-reflex/valorant-php
As the package is PSR-18 compliant, it does not come with an HTTP client by default.
You can use a client such as Guzzle, and pass an instance of it when instantiating:
$http = new GuzzleHttp\Client();
$valorant = new Valorant($http, 'api_key_here', AccountRegion::AMERICAS(), MatchRegion::AMERICA());
Now you're ready to make requests:
$player = $valorant->fetchAccountByRiot('Kairu#1481');