Closed omarshaarawi closed 5 years ago
For the free_agents function you can add size as a parameter like so free_agents(size=100). Right now if you do not pass size in, it defaults to 50.
For box_player stats that might be possible I will have to check endpoint to see what data is given for the players
Thanks for the size tip. I'm finding the Kona player endpoint ay be providing the projected and actual scores.
https://fantasy.espn.com/apis/v3/games/ffl/seasons/2019/segments/0/leagues/{league_id}?scoringPeriodId=1&view=kona_player_info
Taking my league's waiver wire, I looked up Rams D/ST and saw they had a projected 6.2 points and actual points being 11.
looking through the endpoint, I get this tidbit (took out a lot a bulk)
{
"appliedAverage": 7.583085239499999,
"appliedTotal": 121.32936383199998,
"externalId": "2018",
"id": "102018",
"proTeamId": 0,
"scoringPeriodId": 0,
"seasonId": 2018,
"statSourceId": 1,
"statSplitTypeId": 0,
"variance": {}
},
{
"appliedAverage": 6.68605639025,
"appliedTotal": 106.976902244,
"externalId": "2019",
"id": "102019",
"proTeamId": 0,
"scoringPeriodId": 0,
"seasonId": 2019,
"statSourceId": 1,
"statSplitTypeId": 0,
},
{
"appliedTotal": 6.244230292000001,
"externalId": "20191",
"id": "1120191",
"proTeamId": 0,
"scoringPeriodId": 1,
"seasonId": 2019,
"statSourceId": 1,
"statSplitTypeId": 1,
},
{
"appliedTotal": 11,
"externalId": "401127923",
"id": "01401127923",
"proTeamId": 14,
"scoringPeriodId": 1,
"seasonId": 2019,
"statSourceId": 0,
"statSplitTypeId": 1,
},
{
"appliedAverage": 9.75,
"appliedTotal": 156,
"externalId": "2018",
"id": "002018",
"proTeamId": 0,
"scoringPeriodId": 0,
"seasonId": 2018,
"statSourceId": 0,
"statSplitTypeId": 0,
"variance": {}
},
{
"appliedAverage": 0,
"appliedStats": {},
"appliedTotal": 0,
"externalId": "2019",
"id": "002019",
"proTeamId": 0,
"scoringPeriodId": 0,
"seasonId": 2019,
"statSourceId": 0,
"statSplitTypeId": 0,
"stats": {}
}
Notice both appliedTotals, 6.2 and 11 points.
I'm very unfamiliar with what the rest of these stats are so I can't be sure that whatever I'm seeing is accurate or what I think it is.
Thanks for the data. Yeah I think if we want to add projected to free agents I will need to pass the current scoring period down so that I can filter out the other stats data
Currently, the endpoint does not grab all free agents. I'm not entirely sure what criteria is takes to when it returns a few free agents but it would be nice to have all of them plus box_player info on them. Will search on my end to see if feasible.