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

[Bug]: How to get the list of in season tournament games? #442

Open
jaratec opened this issue May 5, 2024 · 4 comments
Open

[Bug]: How to get the list of in season tournament games? #442

jaratec opened this issue May 5, 2024 · 4 comments
Labels
endpoint: third-party issue Issues, unrelated to the library, that exists within the 3rd-party's API service.

Comments

@jaratec
Copy link

jaratec commented May 5, 2024

NBA API Version

1.4.1

Issue

How can I use the leaguegamefinder endpoint to get the list of in-season tournament games? The following code snippet does not work.
Also, are the valid values for season_type_nullable parameter documented?

Code

from nba_api.stats.endpoints import leaguegamefinder

gamefinder = leaguegamefinder.LeagueGameFinder(season_nullable='2023-24',
league_id_nullable='00',
season_type_nullable='IST', # what are the valid values? 'Regular Season', 'IST', 'PlayIn', 'Playoffs'
player_or_team_abbreviation='T')

@jaratec jaratec added bug Something isn't working triage Researching into a possible bug labels May 5, 2024
@rsforbes
Copy link
Collaborator

rsforbes commented Jun 8, 2024

@jaratec - Will get this look at this weekend.

@sebasdarius
Copy link

@jaratec - Will get this look at this weekend.

Was a solution ever found by any chance?

@rsforbes
Copy link
Collaborator

rsforbes commented Oct 9, 2024

@jaratec / @sebasdarius - What are you looking for out of these calls? A PR was merged last year for In Season Tournaments (#363).

Notes:

  1. The NBA is retiring some endpoints (this could be one that is targeted, and thus not updated)
  2. Usually, I can find these endpoints used throughout the UI on stats.nba.com. I wasn't able to locate this one. If you have a link, please post it. That'll help verify if IST is supported or not.

I saw that on a few areas of the NBA with drop-down fields on stats, the "NBA Cup" (aka In Season Tournament) wasn't present. That gives me an indication that it may not be supported in all cases.

Here's a Postman call I use. When I used IST if obviously failed.

https://stats.nba.com/stats/leaguegamefinder?Conference=&DateFrom=&DateTo=&Division=&DraftNumber=&DraftRound=&DraftTeamID=&DraftYear=&EqAST=&EqBLK=&EqDD=&EqDREB=&EqFG3A=&EqFG3M=&EqFG3_PCT=&EqFGA=&EqFGM=&EqFG_PCT=&EqFTA=&EqFTM=&EqFT_PCT=&EqMINUTES=&EqOREB=&EqPF=&EqPTS=&EqREB=&EqSTL=&EqTD=&EqTOV=&GameID=&GtAST=&GtBLK=&GtDD=&GtDREB=&GtFG3A=&GtFG3M=&GtFG3_PCT=&GtFGA=&GtFGM=&GtFG_PCT=&GtFTA=&GtFTM=&GtFT_PCT=&GtMINUTES=&GtOREB=&GtPF=&GtPTS=&GtREB=&GtSTL=&GtTD=&GtTOV=&LeagueID=00&Location=&LtAST=&LtBLK=&LtDD=&LtDREB=&LtFG3A=&LtFG3M=&LtFG3_PCT=&LtFGA=&LtFGM=&LtFG_PCT=&LtFTA=&LtFTM=&LtFT_PCT=&LtMINUTES=&LtOREB=&LtPF=&LtPTS=&LtREB=&LtSTL=&LtTD=&LtTOV=&Outcome=&PORound=&PlayerID=&PlayerOrTeam=T&RookieYear=&Season=2023-24&SeasonSegment=&SeasonType=Regular Season&StarterBench=&TeamID=&VsConference=&VsDivision=&VsTeamID=&YearsExperience=

@rsforbes rsforbes added endpoint: third-party issue Issues, unrelated to the library, that exists within the 3rd-party's API service. and removed bug Something isn't working triage Researching into a possible bug labels Oct 9, 2024
@Mark-DelGrande
Copy link

from nba_api.stats.library.parameters import SeasonTypeAllStar
from nba_api.stats.endpoints import leaguegamefinder, playbyplayv2, boxscoretraditionalv2
def get_game_ids(start_date, end_date):
    # Get all games for the specified season
    gamefinder = leaguegamefinder.LeagueGameFinder(
        season_nullable='2023-24', season_type_nullable=SeasonTypeAllStar.regular
    )
    games = gamefinder.get_data_frames()[0]

This code worked for me still if it helps anyone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
endpoint: third-party issue Issues, unrelated to the library, that exists within the 3rd-party's API service.
Projects
None yet
Development

No branches or pull requests

4 participants