test0n3/rest-api-js-python-ruby

javascript: implement endpoints

Closed this issue · 0 comments

  • user can read information using the endpoints for the 3 objects: Workout, Member, Record.
  • test information to use:
{
  "workouts": [
    {
      "id": "61dbae02-c147-4e28-863c-db7bd402b2d6",
      "name": "Tommy V",
      "mode": "For Time",
      "equipment": ["barbell", "rope"],
      "exercises": [
        "21 thrusters",
        "12 rope climbs, 15 ft",
        "15 thrusters",
        "9 rope climbs, 15 ft",
        "9 thrusters",
        "6 rope climbs, 15 ft"
      ],
      "createdAt": "4/20/2022, 2:21:56 PM",
      "updatedAt": "7/5/2023, 3:34:09 PM",
      "trainerTips": [
        "Split the 21 thrusters as needed",
        "Try to do the 9 and 6 thrusters unbroken",
        "RX Weights: 115lb/75lb"
      ],
    },
    {
      "id": "4a3d9aaa-608c-49a7-a004-66305ad4ab50",
      "name": "Dead Push-Ups",
      "mode": "AMRAP 10",
      "equipment": ["barbell"],
      "exercises": ["15 deadlifts", "15 hand-release push-ups"],
      "createdAt": "1/25/2022, 1:15:44 PM",
      "updatedAt": "3/10/2022, 8:21:56 AM",
      "trainerTips": [
        "Deadlifts are meant to be light and fast",
        "Try to aim for unbroken sets",
        "RX Weights: 135lb/95lb"
      ],
    },
    {
      "id": "d8be2362-7b68-4ea4-a1f6-03f8bc4eede7",
      "name": "Heavy DT",
      "mode": "5 Rounds For Time",
      "equipment": ["barbell", "rope"],
      "exercises": ["12 deadlifts", "9 hang power cleans", "6 push jerks"],
      "createdAt": "11/20/2021, 5:39:07 PM",
      "updatedAt": "11/20/2021, 5:39:07 PM",
      "trainerTips": [
        "Aim for unbroken push jerks",
        "The first three rounds might feel terrible, but stick to it",
        "RX Weights: 205lb/145lb"
      ],
    },
    {
      "name": "Core Buster",
      "mode": "AMRAP 20",
      "equipment": ["rack", "barbell", "abmat"],
      "exercises": ["15 toes to bars", "10 thrusters", "30 abmat sit-ups"],
      "trainerTips": [
        "Split your toes to bars into two sets maximum",
        "Go unbroken on the thrusters",
        "Take the abmat sit-ups as a chance to normalize your breath"
      ],
      "id": "31e799e1-f973-42fd-ae9c-f98593830061",
      "createdAt": "7/4/2023, 4:50:53 PM",
      "updatedAt": "7/4/2023, 4:50:53 PM",
    },
    {
      "name": "Jumping (Not) Made Easy",
      "mode": "AMRAP 12",
      "equipment": ["jump rope"],
      "exercises": ["10 burpees", "25 double-unders"],
      "trainerTips": [
        "Scale to do 50 single-unders, if double-unders are too difficult"
      ],
      "id": "8f8318f8-b869-4e9d-bb78-88010193563a",
      "createdAt": "4/25/2022, 2:45:28 PM",
      "updatedAt": "4/25/2022, 2:45:28 PM"
    },
    {
      "name": "Burpee Meters",
      "mode": "3 Rounds For Time",
      "equipment": ["Row Erg"],
      "exercises": [
        "Row 500 meters",
        "21 burpees",
        "Run 400 meters",
        "Rest 3 minutes"
      ],
      "trainerTips": [
        "Go hard",
        "Note your time after the first run",
        "Try to hold your pace"
      ],
      "id": "0a5948af-5185-4266-8c4b-818889657e9d",
      "createdAt": "4/25/2022, 2:48:53 PM",
      "updatedAt": "4/25/2022, 2:48:53 PM"
    },
    {
      "name": "Dumbbell Rower",
      "mode": "AMRAP 15",
      "equipment": ["Dumbbell"],
      "exercises": [
        "15 dumbbell rows, left arm",
        "15 dumbbell rows, right arm",
        "50-ft handstand walk"
      ],
      "trainerTips": [
        "RX weights for women: 35-lb",
        "RX weights for men: 50-lb"
      ],
      "id": "3dc53bc8-27b8-4773-b85d-89f0a354d437",
      "createdAt": "4/25/2022, 2:56:03 PM",
      "updatedAt": "4/25/2022, 2:56:03 PM"
    }
  ],
  "members": [
    {
      "id": "12a410bc-849f-4e7e-bfc8-4ef283ee4b19",
      "name": "Jason Miller",
      "gender": "male",
      "dateOfBirth": "23/04/1990",
      "email": "jason@mail.com",
      "password": "666349420ec497c1dc890c45179d44fb13220239325172af02d1fb6635922956",
     "createdAt": "5/25/2022, 4:23:46 PM",
     "updatedAt":"5/25/2022, 4:23:46 PM"
    },
    {
      "id": "2b9130d4-47a7-4085-800e-0144f6a46059",
      "name": "Tiffany Brookston",
      "gender": "female",
      "dateOfBirth": "09/06/1996",
      "email": "tiffy@mail.com",
      "password": "8a1ea5669b749354110dcba3fac5546c16e6d0f73a37f35a84f6b0d7b3c22fcc",
     "createdAt": "5/25/2022, 4:23:46 PM",
     "updatedAt":"5/25/2022, 4:23:46 PM"
    },
    {
      "id": "11817fb1-03a1-4b4a-8d27-854ac893cf41",
      "name": "Catrin Stevenson",
      "gender": "female",
      "dateOfBirth": "17/08/2001",
      "email": "catrin@mail.com",
      "password": "18eb2d6c5373c94c6d5d707650d02c3c06f33fac557c9cfb8cb1ee625a649ff3",
     "createdAt": "5/25/2022, 4:23:46 PM",
     "updatedAt":"5/25/2022, 4:23:46 PM"

    },
    {
      "id": "6a89217b-7c28-4219-bd7f-af119c314159",
      "name": "Greg Bronson",
      "gender": "male",
      "dateOfBirth": "08/04/1993",
      "email": "greg@mail.com",
      "password": "a6dcde7eceb689142f21a1e30b5fdb868ec4cd25d5537d67ac7e8c7816b0e862",
     "createdAt": "5/25/2022, 4:23:46 PM",
     "updatedAt":"5/25/2022, 4:23:46 PM"

    }
  ],
  "records": [
    {
      "id": "ad75d475-ac57-44f4-a02a-8f6def58ff56",
      "workout": "4a3d9aaa-608c-49a7-a004-66305ad4ab50",
      "record": "160 reps",
      "memberId": "12a410bc-849f-4e7e-bfc8-4ef283ee4b19",
      "member": "/members/:memberId",
     "createdAt": "8/25/2023, 4:23:46 PM",
     "updatedAt":"8/25/2023, 4:23:46 PM"

    },
    {
      "id": "0bff586f-2017-4526-9e52-fe3ea46d55ab",
      "workout": "d8be2362-7b68-4ea4-a1f6-03f8bc4eede7",
      "record": "7:23 minutes",
      "memberId": "2b9130d4-47a7-4085-800e-0144f6a46059",
      "member": "/members/:memberId",
     "createdAt": "5/25/2023, 4:23:46 PM",
     "updatedAt":"5/25/2023, 4:23:46 PM"
    },
    {
      "id": "365cc0bb-ba8f-41d3-bf82-83d041d38b82",
      "workout": "a24d2618-01d1-4682-9288-8de1343e53c7",
      "record": "358 reps",
      "memberId": "11817fb1-03a1-4b4a-8d27-854ac893cf41",
      "member": "/members/:memberId",
     "createdAt": "5/25/2023, 4:23:46 PM",
     "updatedAt":"5/25/2023, 4:23:46 PM"
    },
    {
      "id": "62251cfe-fdb6-4fa6-9a2d-c21be93ac78d",
      "workout": "4a3d9aaa-608c-49a7-a004-66305ad4ab50",
      "record": "145 reps",
      "memberId": "6a89217b-7c28-4219-bd7f-af119c314159",
      "member": "/members/:memberId",
     "createdAt": "5/25/2023, 4:23:46 PM",
     "updatedAt":"5/25/2023, 4:23:46 PM"
    }
  ]
}