Skip to content

ESPN Fantasy Football API

2024 10 06 ESPN Fantasy Football SpringBoot

Quickly reviewing what I learned looking through the api.

In the in-match api return for an active week, i.e. scoringPeriodId is set to the current week, and our view contains mBoxScore, mScoreBoard, mLiveScoring, mMatchupScore, we'll get each teams active roster, currrent total projected points, and current live points. In each roster spot, we'll get two different stat objects, one representing the original projection and one the live stats. In the original projection, it's important to note that we have a appliedTotalCeiling value, we'll need that.

The appliedTotalCeiling is almost like a maximum conceived value that the player could achieve for this game. The ESPN match cycles through each player of the team and determines the projected points, which includes the live points + the remaingProjectedPoints, which is the fractional game value left multipled by the original projection.

In the Tt function, we see that the projected ceiling is the addition of the original projected ceiling times the game time remaining fraction plus the live points.

2024 08 26 ESPN Fantasy Football SpringBoot

Ok, my fantasy drafts have been scheduled, season is only a couple of weeks away. The pressure is finally setting it to get this project going again. I kind of wish I had started it back up a couple months ago but here we go!

Now that I am using a season Id from a previous year I realized I had to make some corrections to my League Post method, which was mainly some null checks, like for example playoff bye matches do not have an Away team. Also migrating from SpringBoot 2.x to 3.x was of course a pain as it always has been.

Angular app is initiated. I've gone ahead and created most of the entities. Next step is to finish off the entities and get some components going.

2023 10 07 ESPN Fantasy Football SpringBoot

I've written a lot of the SpringBoot project so far, but I wanted to start taking a few notes as a go.

Roster IDs

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

Game Cast API

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.