Skip to content

jshuster7484/BowlingApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bowling App

An API to keep score of multiple bowling games.

Installing

Install python 3.6
Install the required packages:

pip3 install -r requirements.txt

Running Tests

Run the following command from the BowlingApp directory:

python -m unittest discover

Deployment

Run the following commands from the BowlingApp directory:
Mac:

export FLASK_APP=api.py
python -m flask run

Windows:

set FLASK_APP=api.py
python -m flask run

Operation

Navigate to http://127.0.0.1:5000 to verify that BowlingApp is running.
Use a tool like curl or postman to make the following requests:

  • GET /games returns all current games.
  • POST /games will create a game. It requires the following json:
{
"game_id": 0,
"players": ["Player1", "Player2"]
}
  • GET /games/{game_id} will return the specified game.
  • PUT /games/{game_id} will add a roll to the player specified with the following json:
{
"player": "Player1",
"pins": 10
}
  • DELETE /games/{game_id} will delete the specified game.
  • DELETE /games will delete all games.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages