Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working Data Protocol #3

Open
alcarney opened this issue Nov 1, 2016 · 0 comments
Open

Working Data Protocol #3

alcarney opened this issue Nov 1, 2016 · 0 comments

Comments

@alcarney
Copy link

alcarney commented Nov 1, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant