Skip to content

PSR-18 compliant package for the VALORANT API by Riot

License

Notifications You must be signed in to change notification settings

teamreflex/VALORANTPHP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VALORANTPHP

Test Latest Version Downloads

PSR-18 compliant package for the VALORANT API by Riot.

Note

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.

Installation

Requires PHP 7.4 as it takes advantage of its type support.

Install via composer:

composer require team-reflex/valorant-php

Usage

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');

Contact

About

PSR-18 compliant package for the VALORANT API by Riot

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages