Package org.vrspace.server.api
Class WorldController
java.lang.Object
org.vrspace.server.api.ApiBase
org.vrspace.server.api.WorldController
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 Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class org.vrspace.server.api.ApiBase
currentUserName
-
Field Details
-
PATH
- See Also:
-
-
Constructor Details
-
WorldController
public WorldController()
-
-
Method Details
-
list
-
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 frameworkworldName
- world name of created world, must be uniquetemplateWorldName
- optional world template to useisPublic
- optional flag to create public or private world, default falseisTemporary
- optional flag to create a temporary world, default true- Returns:
- token required to enter the world, only for private worlds
-