You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is work in progress protocol/data specification based on our discussions in code club today.
Creating a Game
POST /game/new: A user's browser will be responsible for POSTing the following data to the server:
game_name: a human readable 'nickname' for a game
In response the server will send:
game_id: The ID number used to refer to this game on the server
Joining a Game
GET /game/avail: A user's browser can make a GET request to this address to get a list of the
available game_ids and game_names of games that are in the Joining state i.e.
[{
"game_id": 72,
"game_name": "Code Club Cardiff"
},
{
"game_id": 128,
"game_name": "Code Club Bristol"
}]
POST /game/join A user's browser can POST to this URL the following data:
game_id: The ID number of the game they wish to join
user_name: The user's nickname that they want displayed throughout the game
In response the server will send:
user_id: The user's ID number for the game
This is enough to get a 'Hello World' application running where people can create a game, and people can join the game. We will sort out starting the game and assigning roles etc. once we have this up and running.
The text was updated successfully, but these errors were encountered:
This is work in progress protocol/data specification based on our discussions in code club today.
Creating a Game
POST /game/new
: A user's browser will be responsible forPOST
ing the following data to the server:game_name
: a human readable 'nickname' for a gameIn response the server will send:
game_id
: The ID number used to refer to this game on the serverJoining a Game
GET /game/avail
: A user's browser can make aGET
request to this address to get a list of theavailable
game_ids
andgame_names
of games that are in theJoining
state i.e.POST /game/join
A user's browser canPOST
to this URL the following data:game_id
: The ID number of the game they wish to joinuser_name
: The user's nickname that they want displayed throughout the gameIn response the server will send:
user_id
: The user's ID number for the gameThis is enough to get a 'Hello World' application running where people can create a game, and people can join the game. We will sort out starting the game and assigning roles etc. once we have this up and running.
The text was updated successfully, but these errors were encountered: