PHP code example of artur-stepien / wot-wn8

1. Go to this page and download the library: Download artur-stepien/wot-wn8 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/ */

    

artur-stepien / wot-wn8 example snippets

 php


use Wargaming\Language\EN;
use Wargaming\Server\EU;
use Wargaming\Api;
use Wargaming\WoT\WN8;

// Include API and WN8 class
 = new Api($language, $server);

// Test method to get WN8 of player ESL_Gorilla on EU server.
try {

	echo 'Calculated WN8 for player [ESL_Gorilla]: '.(string)(new WN8($api, 'ESL_Gorilla'));

} catch (Exception $e) {

	// Ups we got an error
	die($e->getMessage());

}