ely / mojang-api
Library for access to Mojang API.
Installs: 9 680
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 3
Forks: 2
Open Issues: 1
Requires
- php: >=7.1.0
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6|^7
- ramsey/uuid: ^3|^4
Requires (Dev)
- ely/php-code-style: ^0.3.0
- phpunit/phpunit: ^7.0.0
This package is auto-updated.
Last update: 2024-12-21 08:49:19 UTC
README
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.
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.