Active Flag on League Leaders
- League Leaders docs here - https://github.com/swar/nba_api/blob/master/docs/nba_api/stats/endpoints/leagueleaders.md
- Is the
ActiveFlaga viable parameter? Perhaps I'm just formatting it wrong - Working example without the flag
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
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.
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
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 :(
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
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