spruhaN / nutrition_pal

1 stars 1 forks source link

Test Results (Asa Grote) #11

Open AsaGrote opened 1 month ago

AsaGrote commented 1 month ago

Flow #1: Tracking daily calories and inputting workouts

  1. POST /goals Curl

    curl -X 'POST' \
    'https://nutrition-pal.onrender.com/goals/48' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -d '{
    "goal": "lose weight",
    "type": "diet",
    "daily_calories": 2000
    }'

    Response Body

    "OK"
  2. POST /meal Curl

    curl -X 'POST' \
    'https://nutrition-pal.onrender.com/meal/48' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -d '{
    "name": "Mexican",
    "calories": 800
    }'

    Reponse Body

    "OK"
  3. GET /daily_calories Curl

    curl -X 'GET' \
    'https://nutrition-pal.onrender.com/daily_calories/48' \
    -H 'accept: application/json'

    Reponse Body

    {
    "calories_left": 1200
    }
  4. POST /meal Curl

    curl -X 'POST' \
    'https://nutrition-pal.onrender.com/meal/48' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -d '{
    "name": "Italian",
    "calories": 1200
    }'

    Reponse Body

    "OK"
  5. GET /daily_calories Curl

    curl -X 'GET' \
    'https://nutrition-pal.onrender.com/daily_calories/48' \
    -H 'accept: application/json'

    Reponse Body

    {
    "calories_left": 0
    }
  6. GET /meal/day Curl

    curl -X 'GET' \
    'https://nutrition-pal.onrender.com/meal/48/day' \
    -H 'accept: application/json'

    Reponse Body

    [
    {
    "name": "Mexican",
    "calories": 800,
    "time": "2024-05-21T04:41:51.659239+00:00",
    "type": null
    },
    {
    "name": "Italian",
    "calories": 1200,
    "time": "2024-05-21T04:43:49.107473+00:00",
    "type": null
    }
    ]

Flow #2: Adding and looking up workout

  1. POST /goals Curl

    curl -X 'POST' \
    'https://nutrition-pal.onrender.com/goals/48' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -d '{
    "goal": "get big",
    "type": "workout",
    "daily_calories": 2800
    }'

    Response Body

    "OK"
  2. POST /workout Curl

    curl -X 'POST' \
    'https://nutrition-pal.onrender.com/workout/48' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -d '{
    "name": "push-up",
    "sets": 3,
    "reps": 10,
    "length": 14
    }'

    Response Body

    Internal Server Error
  3. GET /workout/{customer_id}/day Curl

    curl -X 'GET' \
    'https://nutrition-pal.onrender.com/meal/48/day' \
    -H 'accept: application/json'

    Response Body

    []
  4. GET /workout/muscle_group/{type} Curl

    curl -X 'GET' \
    'https://nutrition-pal.onrender.com/workouts/muscle_groups/back' \
    -H 'accept: application/json'

    Response Body

    [
    {
    "name": "lat_pulldown",
    "type": "back",
    "group": "lats"
    },
    {
    "name": "cable_row",
    "type": "back",
    "group": "traps"
    },
    {
    "name": "pull_up",
    "type": "back",
    "group": "lats"
    },
    {
    "name": "bent_over_dumbell_row",
    "type": "back",
    "group": "lats"
    }
    ]

Flow #3: Finding workout muscle_groups

  1. POST /goals Curl

    curl -X 'POST' \
    'https://nutrition-pal.onrender.com/goals/48' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -d '{
    "goal": "get big",
    "type": "workout",
    "daily_calories": 2800
    }'

    Response Body

    "OK"
  2. POST /workout Curl

    curl -X 'POST' \
    'https://nutrition-pal.onrender.com/workout/48' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -d '{
    "name": "push-up",
    "sets": 3,
    "reps": 10,
    "length": 14
    }'

    Response Body

    Internal Server Error
  3. GET /workout/{customer_id}/day Curl

    curl -X 'GET' \
    'https://nutrition-pal.onrender.com/meal/48/day' \
    -H 'accept: application/json'

    Response Body

    []
  4. GET /workout/{workout_id}/muscle_groups Curl

    curl -X 'GET' \
    'https://nutrition-pal.onrender.com/workout/19/muscle_groups' \
    -H 'accept: application/json'

    Response Body

    [
    {
    "name": "shoulder_press",
    "type": "arms",
    "group": "shoulders"
    }
    ]