Top.gg Documentation

/

PHP

Official Top.gg PHP library


PHP Library

This is our official PHP Library for Top.gg. If you have any issues, please submit an Issue on our GitHub.

Installation

composer require top-gg/php-sdk

Examples

Get statistics of a user

include_once __DIR__ . "vendor/autoload.php";
use DBL\DBL;
use DBL\API\SearchType;

$token = "YOUR TOP.GG API TOKEN HERE.";
$api = new DBL([
      "token" => $token
]);

if($api->connected)
{
      print_r($api->find_info(SearchType::USER, 242351388137488384));
}
Edit on GitHub