Class Worlds


@RestController @RequestMapping("/vrspace/api/worlds") public class Worlds extends ClientControllerBase
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

    • Worlds

      public Worlds()
  • 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, @RequestBody(required=true) Worlds.CreateWorldOptions params)
      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
      params - world options
      Returns:
      token required to enter the world, only for private worlds
    • enterWorld

      @PostMapping("/enter") public String enterWorld(jakarta.servlet.http.HttpSession session, String worldName, Optional<String> token, Optional<Boolean> async)
      Enter a world, the client must be authenticated. REST equivalent of Enter command. This is only valid after the websocket connection has been established.
      Parameters:
      session - automatically passed by framework
      worldName - Name of the world to enter
      token - Optional token required to enter private world
      async - If set, the Welcome answer is sent over the websocket, and this will return null
      Returns:
      Welcome message containing only publicly accessible Client attributes