zo0o0ot / draft-scorer-nfl

0 stars 1 forks source link

Get prospectinformation from prospect JSON instead of draft JSON #2

Closed zo0o0ot closed 2 years ago

zo0o0ot commented 2 years ago

Prospect info is great for the earlier picks:

"prospect": {
                        "id": "48f19b1d-6da3-4fd3-82c7-39da63e09a96",
                        "source_id": "1ce269a7-bcea-4a21-87fd-835c0f1d2647",
                        "league_id": "f063865f-624c-45ae-9433-4f9565890665",
                        "first_name": "Caleb",
                        "last_name": "Farley",
                        "name": "Caleb Farley",
                        "position": "DB",
                        "team_name": "Virginia Tech",
                        "height": 74,
                        "weight": 207,
                        "experience": "SO",
                        "birth_place": "Maiden, NC, USA",
                        "top_prospect": true
                    }

However, later in the draft, the team information is missing.

"prospect": {
                        "id": "d152f273-d87d-4501-87cb-d41505ef085f",
                        "source_id": "4d834048-c9eb-439b-ad15-ffe56301e805",
                        "league_id": "f9dbd390-b1c7-41a2-9e96-6f5de2848efc",
                        "first_name": "Grant",
                        "last_name": "Stuard",
                        "name": "Grant Stuard",
                        "position": "LB",
                        "height": 73,
                        "weight": 225,
                        "experience": "SR",
                        "birth_place": "Conroe, TX, USA"
                    }

That sucks when I'm trying to get the team info.

Good news: there's more information available in the prospect list, available from a separate API call.

Get that, then take the prospect ID to get team information from the separate list.

zo0o0ot commented 2 years ago

Added in b4ae45671b0b955f1d4d5fdacdd15b633db4e426 Smoothed out in db10387ed4b9555354903aee886f94840f69d3ef