Open asharp02 opened 1 year ago
- [ ] Research the yfpy library and figure out how auth works
To be determined
- [ ] Query yfpy and fetch the above data points
GAME_CODE
- in this case this would be "nba" since we are only supporting NBA fantasy leaguesGAME_KEY
- Numerical identifier for sport and season EX. NBA 2022-23 is 418LEAGUE_ID
- In the case that a user is currently in multiple leagues, we must let user choose which league to select for dashboard (list of all leagues can be retrieved via get_user_leagues_by_game_key({GAME_KEY})
)LEAGUE_ID
as param in query obj: YahooFantasySportsQuery(Path("{PATH TO private.json}"), league_id={LEAGUE_ID}, game_code="nba")
get_league_info()
to find the current_week
and end_week
for a list of valid weeks to choose from.get_team_roster_player_stats_by_week({TEAM_ID}, {WEEK})
to get stats for current team. We should default this to the last full week to base future #'s of off. We could either use weekly player stats OR/AND season player stats via get_team_roster_player_stats({TEAM_ID})
(SHOULD OFFER BOTH).get_league_matchups_by_week({WEEK})
to find opponent
- [ ] Investigate player stats by week query endpoint and determine whether it is functional for fantasy basketball categories (currently does not seem to be returning actual values for the player stats)
Seems somewhat functional in that it returns data but incomplete? Attempting to run the weekly player stats query (get_team_roster_player_stats_by_week
) seems to be returning the last day of the week stats rather than the entire week.
- [ ] How to get # of games per team? Per player? This is crucial in order to calculate accurate player stats aggregated based on # of games being played. This will be the main anchor point for further analysis (how to maximize games played and how to get an accurate player value for an individual week!)
Consider using an NBA schedule API to get this data, doesn't seem like the Yahoo Fantasy API provides games played unless it is a stat tracked within the league's settings.
As part of the first iteration of the fantasy buddy app, we want to create a barebones matchup preview dashboard. Our first step should be to research the yfpy library and attempt to pull basic data from it. Our first data points that we want to make available to our users are basic matchup data specifically: 1) Who is the user matched up with 2) How many games does the user have vs how many games does the opponent have for a specific week
To Do:
[ ] Research the yfpy library and figure out how auth works
[ ] Query yfpy and fetch the above data points
UPDATED:
[ ] Investigate player stats by week query endpoint and determine whether it is functional for fantasy basketball categories (currently does not seem to be returning actual values for the player stats)
[ ] How to get # of games per team? Per player? This is crucial in order to calculate accurate player stats aggregated based on # of games being played. This will be the main anchor point for further analysis (how to maximize games played and how to get an accurate player value for an individual week!)