mirror of
https://github.com/elyby/accounts.git
synced 2024-11-19 19:53:08 +05:30
28 lines
733 B
PHP
28 lines
733 B
PHP
|
<?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);
|
||
|
}
|
||
|
|
||
|
}
|