mirror of
https://github.com/elyby/mojang-api.git
synced 2024-12-23 08:39:54 +05:30
Composer package that provides easy access to Minecraft related Mojang APIs
77ef50bcad
* test validate method * Implemented Refresh, Signout and Invalidate endpoints * Fix refresh and signout requests * revert composer.lock * fix changelog |
||
---|---|---|
src | ||
tests | ||
.gitignore | ||
.php_cs.dist | ||
.travis.yml | ||
CHANGELOG.md | ||
composer.json | ||
composer.lock | ||
LICENSE.md | ||
phpunit.xml | ||
README.md |
Mojang API
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.
Please note that this is not a complete implementation of all available APIs. If you don't find the method you need, open Issue or submit a PR with the implementation.
Installation
To install, use composer:
composer require ely/mojang-api
Usage
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();
Testing
$ ./vendor/bin/phpunit
Contributing
Please see CONTRIBUTING for details.
Credits
This package was designed and developed within the Ely.by project team. We also thank all the contributors for their help.
License
The MIT License (MIT). Please see License File for more information.