2016-09-21 13:43:43 +05:30
|
|
|
<?php
|
|
|
|
namespace tests\codeception\api\_pages;
|
|
|
|
|
|
|
|
class MojangApiRoute extends BasePage {
|
|
|
|
|
|
|
|
public function usernameToUuid($username, $at = null) {
|
|
|
|
$params = $at === null ? [] : ['at' => $at];
|
2017-10-01 05:54:23 +05:30
|
|
|
$this->getActor()->sendGET("/mojang/profiles/{$username}", $params);
|
2016-09-21 13:43:43 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
public function usernamesByUuid($uuid) {
|
2017-10-01 05:54:23 +05:30
|
|
|
$this->getActor()->sendGET("/mojang/profiles/{$uuid}/names");
|
2016-09-21 13:43:43 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
public function uuidsByUsernames($uuids) {
|
2017-10-01 05:54:23 +05:30
|
|
|
$this->getActor()->sendPOST('/mojang/profiles', $uuids);
|
2016-09-21 13:43:43 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
}
|