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

Active Flag on League Leaders #516

Open
caseta opened this issue Mar 11, 2025 · 5 comments
Open

Active Flag on League Leaders #516

caseta opened this issue Mar 11, 2025 · 5 comments

Comments

@caseta
Copy link

caseta commented Mar 11, 2025

https://stats.nba.com/stats/leagueLeaders?LeagueID=00&PerMode=PerGame&Scope=S&Season=2024-25&SeasonType=Regular%20Season&StatCategory=BLK

  • Broken example with the flag

https://stats.nba.com/stats/leagueLeaders?LeagueID=00&PerMode=PerGame&Scope=S&Season=2024-25&SeasonType=Regular%20Season&StatCategory=BLK&ActiveFlag=Y

@slyyyle
Copy link

slyyyle commented Mar 11, 2025

As a note, if I remove the Active Flag value, but leave ActiveFlag= at the end of the URL (nulling the parameter), it works.

I would guess the actual value itself Y, is not a valid value of this parameter. It is hard for me to say more, I am still getting acquainted with these types of things. When I use your second link, I get "invalid parameter". When I take the Y out, it works, signifying the null condition is sufficient to get the response...may be a clue? I think it could be an interesting (yet difficult to distribute) experiment using LLMs to develop different ways to "probe" these endpoints in addition to the current ways? This would most certainly require this file to be generated by some "host", given LLMs are not easily locally hostable by all.

EDIT: I notice this behavior with other parameters. For example, it is confusing what "Rank" parameter does, because regardless of its N or Y value, I can't tell the effect - the Rank columns show up all the same. I null wherever I am unsure, but this will get tough when it comes time to actually make use of the data and verify things like the above.

@caseta
Copy link
Author

caseta commented Mar 11, 2025

Right, it being null is fine, but I'm looking to pass in Y to get active players only if possible. If it is no longer possible the docs / API specs can be updated to remove it I suppose

@slyyyle
Copy link

slyyyle commented Mar 11, 2025

Yep. I've been trying to look at other sources like Hoopr or "similar" packages, for docs about the actual API itself indirectly. I have tried 1,0, true, false, and Y, N. no avail. I am putting around here probably all day, so I'll post back if I can sherlock it out. Hoopr leaves it null, which doesn't help obviously :(

@slyyyle
Copy link

slyyyle commented Mar 11, 2025

In the meantime, you can grab all active players from static players as a workaround and filter your object for those player ids, right? There is a get_active_players() static function IIRC

@caseta
Copy link
Author

caseta commented Mar 11, 2025

Nah that won't work for me. I want to filter out injured players like Wemby, and that static list isn't updated often enough. If Wemy was hurt today, I use that method tomorrow, the static endpoints wouldn't be updated each day

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

2 participants