Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any way to retrieve number of games played per week, a la StatTracker? #51

Open
jonathanlaniado opened this issue Jan 2, 2023 · 3 comments

Comments

@jonathanlaniado
Copy link

Not seeing it in the list of stat IDs on the weekly matchup endpoint for an NBA league. Does Yahoo! not provide this stat via API?

@mattdodge
Copy link
Owner

I'm not in a basketball league so it's a bit tough for me to try things out, but in general the stats that are available via the API are the ones that are visible on the player search page on the league. So if "games played" is not one of your league's stats, it may not be in the API response. The StatTracker applet seems to use it's own source of data separate from the fantasy API so the data you're looking for, unfortunately, may not be available

@xaph
Copy link
Contributor

xaph commented Dec 19, 2023

hi @jonathanlaniado

if you're looking for your or your matchup's game played in total you can check it with this:
matchup.teams.team[0].team_remaining_games.total.completed_games

total object has these attributes:

'total': {
    'remaining_games': 0,
    'live_games': 0,
    'completed_games': 30
}

@jonathanlaniado
Copy link
Author

@xaph Thanks, not sure how I missed this originally. However, it's inaccurate. It counts injuries, whereas StatTracker does not. Wish I could pull that calculation instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants