2023 10 08 ESPN Fantasy Football SpringBoot
After gettings Roster
to work nicely as a
After gettings Roster
to work nicely as a
I've written a lot of the SpringBoot project so far, but I wanted to start taking a few notes as a go.
Many of the entities that I have created by nature have composite IDs. The composite primary key design of RosterEntry
could be a little tricky because you need to decide which field provides uniquenes to the instance, i.e. is it lineupSlotId
(and Team
) or is it playerId
(and Team
). If it's the former, than really your primary key could be the playerPoolEntry
field, as this is already unique to the Team
and league. To determine this, we need to determine if the RosterEntry
is predicated on the slot itself, or the players within the Roster. If I move some players out of their starting positions, this will create additional slots. However, the roster entry array size does not change when queried from
Today I finished up the basic game cast api that is used when you click on the game cast for a matchup. The thing I care most about here is the percentComplete
field for each event because I think taht will definitely help with the matchup win probability field. I can query that for each player my using the players team id and cross referencing which event that competetitor
is in and see the percent complete.
Today we uncovered all the details of the schedule
object that is revealed in mLiveScoring
, mScoreboard
, mMatchupScore
and mMatchup
. Go check it out at in depth analysis of the response data.
Because I love fantasy football, databases, and analytics, I've decided to do a deep dive through the ESPN Fantasy Football API this week to document how to get this data and demonstrate how to use Jackson and create SpringBoot apps and MySql databases in the process! Badass right!