2019-02-21 01:28:52 +05:30
|
|
|
<?php
|
|
|
|
namespace api\tests\_pages;
|
|
|
|
|
|
|
|
class SessionServerRoute extends BasePage {
|
|
|
|
|
2024-12-02 15:40:55 +05:30
|
|
|
public function join($params): void {
|
2019-02-21 01:28:52 +05:30
|
|
|
$this->getActor()->sendPOST('/api/minecraft/session/join', $params);
|
|
|
|
}
|
|
|
|
|
2024-12-02 15:40:55 +05:30
|
|
|
public function joinLegacy(array $params): void {
|
2019-02-21 01:28:52 +05:30
|
|
|
$this->getActor()->sendGET('/api/minecraft/session/legacy/join', $params);
|
|
|
|
}
|
|
|
|
|
2024-12-02 15:40:55 +05:30
|
|
|
public function hasJoined(array $params): void {
|
2019-02-21 01:28:52 +05:30
|
|
|
$this->getActor()->sendGET('/api/minecraft/session/hasJoined', $params);
|
|
|
|
}
|
|
|
|
|
2024-12-02 15:40:55 +05:30
|
|
|
public function hasJoinedLegacy(array $params): void {
|
2019-02-21 01:28:52 +05:30
|
|
|
$this->getActor()->sendGET('/api/minecraft/session/legacy/hasJoined', $params);
|
|
|
|
}
|
|
|
|
|
2024-12-02 15:40:55 +05:30
|
|
|
public function profile(string $profileUuid, bool $signed = false): void {
|
2021-03-03 19:34:42 +05:30
|
|
|
$url = "/api/minecraft/session/profile/{$profileUuid}";
|
|
|
|
if ($signed) {
|
|
|
|
$url .= '?unsigned=false';
|
|
|
|
}
|
|
|
|
|
|
|
|
$this->getActor()->sendGET($url);
|
2019-02-21 01:28:52 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
}
|