Skip to content

REST-ful API generating arithmetic problems and solutions along with a PostgreSQL db to store question histories

Notifications You must be signed in to change notification settings

aidankahng/basic-math-leaderboard-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST-ful Math Problem Generator

Math problem API created in Python using Flask, SQL Alchemy, and a PostgreSQL database. Webservice and database are hosted on Render.

Public Routes (No auth needed):

[GET] /random

Example JSON Data:

{
    "prompt" : "12 x 7 = ",
    "answer" : "84",
    "value" : 1.3
}

[GET] /practice/mult

HTML webpage with single practice problem of the form "a x b = "

[GET] /practice/add

HTML webpage with single practice problem of the form "a + b = "

[GET] /questions

List of all questions answered so far as a JSON Example: TBD

[GET] /highscores

JSON List of users ordered by total points accumulated Example JSON Data:

[
    {
        "clan": "some-clan",
        "message": "Math is fun!",
        "numQuizzes": 6,
        "points": "89.5",
        "totalAttempted": 75,
        "totalCorrect": 73,
        "totalQuestions": 75,
        "user": "testUser123"
    },
    {
        "clan": "noclan",
        "message": "Why is 0! = 1?",
        "numQuizzes": 3,
        "points": "64.2",
        "totalAttempted": 30,
        "totalCorrect": 24,
        "totalQuestions": 30,
        "user": "anotherUser"
    }, ...
]

[POST] /sign-up

TBD

Protected Routes:

TBD

About

REST-ful API generating arithmetic problems and solutions along with a PostgreSQL db to store question histories

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published