Class WorldController

java.lang.Object
org.vrspace.server.api.ApiBase
org.vrspace.server.api.WorldController

@RestController @RequestMapping("/vrspace/api/worlds") public class WorldController extends ApiBase
World controller handles worlds-related operations. Currently only list and count users, publicly available. Eventually it should allow world creation and management for authorised users.
Author:
joe
  • Field Details

  • Constructor Details

    • WorldController

      public WorldController()
  • Method Details

    • list

      @GetMapping("/list") public List<World> list()
    • users

      @GetMapping("/users") public List<WorldStatus> users()
    • createWorld

      @PostMapping("/create") public org.springframework.http.ResponseEntity<String> createWorld(jakarta.servlet.http.HttpSession session, @RequestParam(required=true) String worldName, String templateWorldName, boolean isPublic, boolean isTemporary)
      Create a private world, the user must be authenticated. If the world already exists, owner may change isPublic or isTemporary parameters. Returns HTTP 201 CREATED for created world, or HTTP 200 OK if world already exists.
      Parameters:
      session - automatically passed by framework
      worldName - world name of created world, must be unique
      templateWorldName - optional world template to use
      isPublic - optional flag to create public or private world, default false
      isTemporary - optional flag to create a temporary world, default true
      Returns:
      token required to enter the world, only for private worlds