Class 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
    • Constructor Detail

      • WorldController

        public WorldController()
    • Method Detail

      • list

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

        @PostMapping("/create")
        public org.springframework.http.ResponseEntity<String> createWorld​(javax.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