Skip to content

Commit 6aff09c

Browse files
authored
Add playAgain endpoint to Lobby documentation (#652)
* Update Lobby.md * Update Lobby.md
1 parent 9f4acfe commit 6aff09c

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

docs/documentation/api/Lobby.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,21 @@ Returns a room instance. Each instance has fields:
133133
#### Client Authentication
134134

135135
All actions for an authenticated game require an additional payload field `credentials`, which must be the given secret associated with the player.
136+
137+
#### Playing again
138+
139+
##### POST `/games/{name}/{id}/playAgain`
140+
141+
`{name}` (required): the name of the game being played again.
142+
143+
`{id}` (required): the ID of the previous finished room.
144+
145+
Given a previous room, generates a room ID where users should go if they want to play again. Creates this new room if it didn't exist before.
146+
147+
Accepts these parameters:
148+
149+
`playerID` (required): the player ID of the player on the previous game.
150+
151+
`credentials` (required): player's credentials.
152+
153+
Returns `nextRoomID`, which is the ID of the newly created room that the user should go to play again.

0 commit comments

Comments
 (0)