All functions of overdark API into a PHP Library, for more info https://overdarkgame.com/langs/en/api/#/documentation
Retrive API Token from OverDarkAPI, if you not have, register to bot
With json file (Composer
):
{
...
"require": {
"tappo03/overdark_api": "*"
}
}
With command line (Composer
):
➖ composer require tappo03/overdark_api
➖ You can call overdark api with Tappo03\overdark\api
namespace:
<?php
require_once __DIR__ . '/vendor/autoload.php';
use Tappo03\overdark\api\request;
$over_dark = new Request('en', 'token', false);
➖ get_profile example:
<?php
require_once __DIR__ . '/vendor/autoload.php';
use Tappo03\overdark\api\request;
$over_dark = new Request('en', 'token', false);
print_r ($over_dark->get_profile ('0pl'));
➖ get_clan example:
<?php
require_once __DIR__ . '/vendor/autoload.php';
use Tappo03\overdark\api\request;
$over_dark = new Request('en', 'token', false);
print_r ($over_dark->get_clan ('CN0PP'));
➖ get_char_info example:
<?php
require_once __DIR__ . '/vendor/autoload.php';
use Tappo03\overdark\api\request;
$over_dark = new Request('en', 'token', false);
print_r ($over_dark->get_char_info ());
➖ get_classification example:
<?php
require_once __DIR__ . '/vendor/autoload.php';
use Tappo03\overdark\api\request;
$over_dark = new Request('en', 'token', false);
print_r ($over_dark->get_classification ('overworld')); // or darkworld
➖ get_player_image example:
<?php
require_once __DIR__ . '/vendor/autoload.php';
use Tappo03\overdark\api\request;
$over_dark = new Request('en', 'token', false);
print_r ($over_dark->get_player_image (10000000, true)); // or false (without background)