PHP code example of anlutro / sc2ranks-v2
1. Go to this page and download the library: Download anlutro/sc2ranks-v2 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/ */
anlutro / sc2ranks-v2 example snippets
$sc2r = new \anlutro\SC2Ranks\SC2Ranks('my_api_key');
$player = $sc2r->getPlayerFromProfileUrl('http://eu.battle.net/sc2/en/profile/180786/1/Raziel/');
try {
$teams = $sc2r->getPlayerTeams($player);
var_dump($teams);
} catch (\anlutro\SC2Ranks\SC2RanksException $e) {
echo $e->getMessage();
}