There may be extra columns in the CSV a user has uploaded (eg. min_exposure, max_exposure). The front end doesn't read these columns and save the values for each player.
Now that we're requesting from the .csv API and not the JSON API, there's no way to check the status of players. We can possibly add this back in but we need several Python APIs to support multiple sports.
Or possibly a simpler way to get player statuses is:
Make a second request from https://api.draftkings.com/draftgroups/v1/draftgroups/{DRAFT_GROUP_ID/draftables endpoint
Loop through the players in the .csv (retrieved from https://www.draftkings.com/lineup/getavailableplayerscsv?contestTypeId={contest_id}&draftGroupId={draft_group_id})
In the loop, find that player in the endpoint above and get the status
Finally map a new JSON (or Pandas dataframe) with the appropriate statuses
DraftKing's API doesn't provide "Roster positions" (ex: PF/C/FLEX) which is needed for better optimization calculations.
Instead we can either:
Only allow CSV uploads for now
Request and download CSV from this URL: https://www.draftkings.com/lineup/getavailableplayerscsv?contestTypeId=${CONTEST_TYPE_ID}&draftGroupId=${DRAFT_GROUP_ID} then transform players on the backend