You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ethan calls POST /draft/ with advanced experience level, a PPR draft type, private visibility, and a team name of “Ethan’s Avengers”. Ethan also calls this endpoint with settings specifying a draft length of 60 seconds, roster positions of QB, RB, WR, TE, D/ST, and K, a roster size of 12 players, and a draft size of 10 teams. This returns a new draft with an ID of 1234.
Cameron calls PUT teams/65/ with a team name of “Cameron’s Commanders” to update his team name.
Updating Cameron's team name as follows:
{
"team_name": "Cameron's Team"
}
Caution
Finishing this flow results in an internal server error
Internal Server Error
Example Flow 2 (Player Stats)
Samantha calls GET /players/ to get a list of all players available in the draft. This includes a player named “Justin Fields” with a player ID of 6752, who Samantha believes is a sleeper in the draft.
Warning
There is no endpoint available on the /docs that is labeled /players and returns a list
Calling the /players/search endpoint with the default values yielded this result:
There was no player 6752 it does not seem like the players all have numeric IDs so LoveJo03 was chosen and used for the next step
Samantha calls GET /players/6752/ to retrieve all the statistics and history for the player named “Justin Fields”. She can now see that the player named “Justin Fields” started 13 games and threw 16 touchdowns last season.
When using the player that was mentioned above, this data is returned:
Tyler calls PUT /drafts/{draft_id}/start to start the draft that he created. This automatically assigns each team in the draft a random number from 1 to the number of teams in the draft (with no duplicates). This number represents that team’s draft pick.
Using the draft ID generated above (16) the draft was started and returned this:
{
"success": true,
"message": "Draft started and draft positions assigned randomly"
}
Tyler calls PUT /drafts/{draft_id}/pause to pause the draft. At the current moment, nobody can make a pick and the draft timer for the current pick is halted.
After calling this endpoint a 200 OK response was received
Being unfamiliar with the concept of "picking" I was unable to test weather or not the timer and pick feature was stopped but, it does not seem like there is logic that has been implemented to allow pick.
Tyler calls PUT /drafts/{draft_id}/resume once he has turned off the stove to resume the draft.
After calling the resume endpoint, this message is returned:
The draft concludes with a call to PUT /drafts/{draft_id}/end.
Then calling the end endpoint this message is returned:
{
"success": true
}
Additional Test Flows
Additional Flow 1 (Search Functionality)
There should be some way of verifying the search functionality.
Lucas is following the player "Jordan Love" and wants to know more information on the player. He puts his name into the search field of the /player/search endpoint to get more information.
He then hears about another player but only knows their ID of "NacuPu00" and inputs that in to the /player/search as well.
Finally, he wants to see what players are on team "DET" and puts that into the search field.
Additional Flow 2 (Adding Multiple Teammates)
There should be a test of adding multiple teammates to a draft
John creates a custom draft room and wants to add his friends as other teams in the room. He starts by creating his own draft room.
He then adds 10 of his friends to the room.
Finally, he verifies that all of his friends have made it to the room
Additional Flow 3 (Modification During a Draft)
Assuming that there are certain things that cannot be modified during a draft. Attempt to modify during a draft.
Luis starts his draft by calling the start endpoint
Then try to add another person's team to the draft
After attempting to add a person, check to see if they have been added to the draft.
Testing Flows
Testing Flow 1 (Custom Draft)
This is what I sent to test flow 1:
{ "draft_type": "PPR", "draft_name": "Ethan's", "draft_size": 10, "draft_length": 60, "roster_positions": [ { "position": "QB", "min_num": 1, "max_num": 2 }, { "position": "RB", "min_num": 3, "max_num": 4 }, { "position": "WR", "min_num": 5, "max_num": 6 }, { "position": "TE", "min_num": 7, "max_num": 8 }, { "position": "D/ST", "min_num": 9, "max_num": 10 }, { "position": "K", "min_num": 11, "max_num": 12 } ], "flex_spots": 0, "roster_size": 12, "team_name": "Ethan's Avengers", "user_name": "Ethan" }I received this return with a
200 ok{ "draft_id": 16 }Calling the get drafts endpoint I got the following results:
[ { "draft_id": 15, "draft_name": "Fantastic Footies", "draft_type": "LOL", "draft_size": 1200, "roster_size": 100, "draft_length": 11, "flex_spots": 60 }, { "draft_id": 16, "draft_name": "Ethan's", "draft_type": "PPR", "draft_size": 10, "roster_size": 12, "draft_length": 60, "flex_spots": 0 } ]Then adding Cameron to the team with this json body:
{ "team_name": "Ethan's Avengers", "user_name": "Cameron" }The team ID is then returned as follows:
{ "team_id": 26 }Updating Cameron's team name as follows:
{ "team_name": "Cameron's Team" }Caution
Finishing this flow results in an internal server error
Internal Server ErrorExample Flow 2 (Player Stats)
Warning
There is no endpoint available on the
/docsthat is labeled/playersand returns a listCalling the
/players/searchendpoint with the default values yielded this result:{ "previous": "", "next": "2", "results": [ { "player_id": "LambCe00", "player_name": "CeeDee Lamb", "position": "WR", "team": "DAL", "age": 24, "standard_fantasy_points": 268, "ppr_fantasy_points": 403.2 }, { "player_id": "AlleJo02", "player_name": "Josh Allen", "position": "QB", "team": "BUF", "age": 27, "standard_fantasy_points": 393, "ppr_fantasy_points": 392.6 }, { "player_id": "McCaCh01", "player_name": "Christian McCaffrey", "position": "RB", "team": "SFO", "age": 27, "standard_fantasy_points": 324, "ppr_fantasy_points": 391.3 }, { "player_id": "HillTy00", "player_name": "Tyreek Hill", "position": "WR", "team": "MIA", "age": 29, "standard_fantasy_points": 257, "ppr_fantasy_points": 376.4 }, { "player_id": "HurtJa00", "player_name": "Jalen Hurts", "position": "QB", "team": "PHI", "age": 25, "standard_fantasy_points": 357, "ppr_fantasy_points": 356.8 }, { "player_id": "PresDa01", "player_name": "Dak Prescott", "position": "QB", "team": "DAL", "age": 30, "standard_fantasy_points": 343, "ppr_fantasy_points": 342.8 }, { "player_id": "JackLa00", "player_name": "Lamar Jackson", "position": "QB", "team": "BAL", "age": 26, "standard_fantasy_points": 331, "ppr_fantasy_points": 331.2 }, { "player_id": "StxxAm00", "player_name": "Amon-Ra St. Brown", "position": "WR", "team": "DET", "age": 24, "standard_fantasy_points": 212, "ppr_fantasy_points": 330.9 }, { "player_id": "LoveJo03", "player_name": "Jordan Love", "position": "QB", "team": "GNB", "age": 25, "standard_fantasy_points": 319, "ppr_fantasy_points": 319.1 }, { "player_id": "NacuPu00", "player_name": "Puka Nacua", "position": "WR", "team": "LAR", "age": 22, "standard_fantasy_points": 194, "ppr_fantasy_points": 298.5 } ] }There was no player 6752 it does not seem like the players all have numeric IDs so
LoveJo03was chosen and used for the next stepWhen using the player that was mentioned above, this data is returned:
{ "player_stats": { "history": [ { "player_id": "LoveJo03", "year": 2023, "age": 25, "position": "QB", "team": "GNB", "games_played": 17, "games_started": 17, "passing_yards": 4159, "passing_tds": 32, "interceptions": 11, "rushing_atts": 50, "rushing_yards": 247, "targets": 0, "receptions": 0, "receiving_yards": 0, "receiving_tds": 0, "fumbles": 9, "fumbles_lost": 3, "two_point_conversions": 0, "fantasy_points_standard_10": 319, "fantasy_points_ppr_10": 319.1, "rushing_tds": 4, "two_point_conversions_passing": 2 } ] } }Example Flow 3 (Managing Drafts)
Using the draft ID generated above (
16) the draft was started and returned this:{ "success": true, "message": "Draft started and draft positions assigned randomly" }After calling this endpoint a
200 OKresponse was receivedBeing unfamiliar with the concept of "picking" I was unable to test weather or not the timer and pick feature was stopped but, it does not seem like there is logic that has been implemented to allow pick.
After calling the resume endpoint, this message is returned:
{ "success": true, "message": "Draft resumed successfully" }Then calling the end endpoint this message is returned:
{ "success": true }Additional Test Flows
Additional Flow 1 (Search Functionality)
There should be some way of verifying the search functionality.
/player/searchendpoint to get more information./player/searchas well.Additional Flow 2 (Adding Multiple Teammates)
There should be a test of adding multiple teammates to a draft
Additional Flow 3 (Modification During a Draft)
Assuming that there are certain things that cannot be modified during a draft. Attempt to modify during a draft.