This is a simple package for the recently released Valorant Api, it's a php wrapper that makes calling the api much easier. The package follows psr-12 standards and has complete test coverage.
You can install the package via composer:
composer require jakejames/valorant-api-php-wrapper
I don't currently have access to the match api endpoints due to it not being available in my policy
Instantiate the Valorant API class with your api token and your region. If you want to call the account endpoints for your riot account details then you need to use the riot region enum rather than the valorant enum.
new ValorantApi('Your riot API Token', ValorantRegion::EUROPE());
$api = new ValorantApi('Your riot API Token', ValorantRegion::EUROPE());
$api->content()->getContent();
$api->ranked()->getLeaderboardByAct('actId');
$api->match()->getRecentMatches('unrated');
$api->status()->getPlatformData();
new ValorantApi('Your riot API Token', RiotRegion::EUROPE());
$api = new ValorantApi('Your riot API Token', RiotRegion::EUROPE());
$api->account()->getAccountByPuuid('Your Puuid');
The Valorant api has 5 classes available, each one has methods related to that class
- Match
- Content
- Ranked
- Status
- Account
Responses are returned inside a data array which contains the response from riot.
array:2 [
"data" => ['test']
"status" => 200
]
array:2 [
"error" => "An unexpected error occurred, please try again"
"status" => "403"
]
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email jakejames18@virginmedia.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
This package was generated using the PHP Package Boilerplate.