mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Реализован функционал Mojang API
Исправлена ошибка доступа к authserver из-за перехода на использование хостов, а не доменов
This commit is contained in:
27
tests/codeception/api/_pages/MojangApiRoute.php
Normal file
27
tests/codeception/api/_pages/MojangApiRoute.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
namespace tests\codeception\api\_pages;
|
||||
|
||||
use yii\codeception\BasePage;
|
||||
|
||||
/**
|
||||
* @property \tests\codeception\api\FunctionalTester $actor
|
||||
*/
|
||||
class MojangApiRoute extends BasePage {
|
||||
|
||||
public function usernameToUuid($username, $at = null) {
|
||||
$this->route = '/mojang/profiles/' . $username;
|
||||
$params = $at === null ? [] : ['at' => $at];
|
||||
$this->actor->sendGET($this->getUrl(), $params);
|
||||
}
|
||||
|
||||
public function usernamesByUuid($uuid) {
|
||||
$this->route = "/mojang/profiles/{$uuid}/names";
|
||||
$this->actor->sendGET($this->getUrl());
|
||||
}
|
||||
|
||||
public function uuidsByUsernames($uuids) {
|
||||
$this->route = '/mojang/profiles';
|
||||
$this->actor->sendPOST($this->getUrl(), $uuids);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user