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