Bingo is a simple app for tracking a simplified corpo-bingo-styled game where players are assigned daily quests for certain work-related phrases. The player marks the number of times the phrase was spoken that day and receives an equivalent in points.
This application provides both a frontend page for displaying each player's phrase and total points, as well as a set of REST endpoints for outside interactions.
Hook up draw_app.app:app
as the WSGI endpoint
in your HTTP server of choice.
See https://flask.palletsprojects.com/en/1.1.x/deploying/#deployment for reference.
A simple front-end is available at /draw/
and redirected to from base URL (/
).
Returns a list of today's assignments.
{
"Player1": "Phrase1",
"Player2": "Phrase2",
"Player3": "Phrase3"
}
Returns the current score of the given player.
{
"Player1": 0
}
Allows modifying a given player's score. Returns the player's score after the modification.
- "action" (string)
action | result |
---|---|
"add" | Increments the player's score |
"reset" | Resets the player's score to zero |
Example:
curl -X POST -d '{"action": "add"}' <app>/draw/api/players/Player1/points
{
"Player1": 1
}