Muslim-Athletic-Association / backend

Contains all of the back-end server code for the Muslim Athletic Association
1 stars 0 forks source link

Fetch all players in a specific division #33

Open osamaramihafez opened 3 years ago

osamaramihafez commented 3 years ago

Fetch players in a specific division. It would be nice to have each team grouped together.

{
    "falafel fc": {
        "player1_id": {"first_name": "Marco", "last_name": "Verrati"},
        "player2_id": {...},
        },
    "Biryani United": {...all player info}
}

Use case: Game sheet creation. We would use this along with a schedule to automatically make the game sheets for the entire season. Note: It's likely easier to automate game sheet creation with python, this is why we'd like to make this endpoint and just hit it from the python script elsewhere.

osamaramihafez commented 3 years ago

Notice the updated response structure.

Also notice that we are dealing with a bunch of tables:

Hint: Try using SQL views to simplify your query.