This package provides easy access to the Minecraft related API of Mojang. The library is built on the top of the Guzzle HTTP client, has custom errors handler and automatic retry in case of problems with Mojang.
To install, use composer:
composer require ely/mojang-api
To start using this library just create a new Api
class instance and call the necessary endpoint:
<?php
$api = new \Ely\Mojang\Api();
$response = $api->usernameToUUID('erickskrauch');
echo $response->getId();
$ ./vendor/bin/phpunit
Please see CONTRIBUTING for details.
This package was designed and developed within the Ely.by project team. We also thank all the contributors for their help.
The MIT License (MIT). Please see License File for more information.