Update docs
This commit is contained in:
parent
9526f7488a
commit
e97642c889
@ -678,6 +678,9 @@ package me.braydon.mc.controller;
|
|||||||
|
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
|
import me.braydon.mc.exception.impl.BadRequestException;
|
||||||
|
import me.braydon.mc.exception.impl.InvalidMinecraftServerPlatform;
|
||||||
|
import me.braydon.mc.exception.impl.ResourceNotFoundException;
|
||||||
import me.braydon.mc.model.MinecraftServer;
|
import me.braydon.mc.model.MinecraftServer;
|
||||||
import me.braydon.mc.model.cache.CachedMinecraftServer;
|
import me.braydon.mc.model.cache.CachedMinecraftServer;
|
||||||
import me.braydon.mc.service.MojangService;
|
import me.braydon.mc.service.MojangService;
|
||||||
@ -712,10 +715,15 @@ public final class ServerController {
|
|||||||
* @param platform the platform of the server
|
* @param platform the platform of the server
|
||||||
* @param hostname the hostname of the server
|
* @param hostname the hostname of the server
|
||||||
* @return the server
|
* @return the server
|
||||||
|
* @throws BadRequestException if the hostname is unknown
|
||||||
|
* @throws InvalidMinecraftServerPlatform if the platform is invalid
|
||||||
|
* @throws ResourceNotFoundException if the server isn't found
|
||||||
*/
|
*/
|
||||||
@GetMapping("/{platform}/{hostname}")
|
@GetMapping("/{platform}/{hostname}")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ResponseEntity<CachedMinecraftServer> getServer(@PathVariable @NonNull String platform, @PathVariable @NonNull String hostname) {
|
public ResponseEntity<CachedMinecraftServer> getServer(@PathVariable @NonNull String platform,@PathVariable @NonNull String hostname)
|
||||||
|
throws BadRequestException, InvalidMinecraftServerPlatform, ResourceNotFoundException
|
||||||
|
{
|
||||||
return ResponseEntity.ofNullable(mojangService.getMinecraftServer(platform, hostname));
|
return ResponseEntity.ofNullable(mojangService.getMinecraftServer(platform, hostname));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user