Composer package that provides easy access to Minecraft related Mojang APIs
Go to file
ErickSkrauch 7211fbc190
Init
2019-04-01 16:04:08 +02:00
src Init 2019-04-01 16:04:08 +02:00
tests Init 2019-04-01 16:04:08 +02:00
.gitignore Init 2019-04-01 16:04:08 +02:00
.php_cs.dist Init 2019-04-01 16:04:08 +02:00
.travis.yml Init 2019-04-01 16:04:08 +02:00
composer.json Init 2019-04-01 16:04:08 +02:00
composer.lock Init 2019-04-01 16:04:08 +02:00
LICENSE.md Init 2019-04-01 16:04:08 +02:00
phpunit.xml Init 2019-04-01 16:04:08 +02:00
README.md Init 2019-04-01 16:04:08 +02:00

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.

Latest Version on Packagist Total Downloads Software License Build Status

Installation

To install, use composer:

composer require ely/mojang-api

Usage

To get the configured Api object right away, just use the static create() method:

<?php
$api = \Ely\Mojang\Api::create();
$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.