PHP code example of jakejames / valorant-api-php-wrapper

1. Go to this page and download the library: Download jakejames/valorant-api-php-wrapper library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jakejames / valorant-api-php-wrapper example snippets

 php
new ValorantApi('Your riot API Token', ValorantRegion::EUROPE());
 php
$api = new ValorantApi('Your riot API Token', ValorantRegion::EUROPE());

$api->content()->getContent();
$api->ranked()->getLeaderboardByAct('actId');
$api->match()->getRecentMatches('unrated');
$api->status()->getPlatformData();
 php
new ValorantApi('Your riot API Token', RiotRegion::EUROPE());
 php
$api = new ValorantApi('Your riot API Token', RiotRegion::EUROPE());

$api->account()->getAccountByPuuid('Your Puuid');
 php
array:2 [
  "data" => ['test']
  "status" => 200
]
 php
array:2 [
  "error" => "An unexpected error occurred, please try again"
  "status" => "403"
]