nba_api icon indicating copy to clipboard operation
nba_api copied to clipboard

season_type_all_star - possible to include both Regular Season and Playoffs?

Open robbylewis7 opened this issue 5 years ago • 2 comments

Is it possible to include something like season_type_all_star=['Playoffs', 'Regular Season'] ?

I ran it but it looks like it only grabs the first value in the array.

robbylewis7 avatar Feb 07 '21 03:02 robbylewis7

@robbylewis7 - Not exactly sure what you are looking for. SeasonType is defined in the stats.library.parameters namespace: https://github.com/swar/nba_api/blob/master/nba_api/stats/library/parameters.py

class SeasonType:
    regular = 'Regular Season'
    preseason = 'Pre Season'

    default = regular


class SeasonTypePlayoffs(SeasonType):
    playoffs = 'Playoffs'


class SeasonTypeNullable(_NotRequired, SeasonTypePlayoffs):
    pass


class SeasonTypeAllStar(SeasonTypePlayoffs):
    all_star = 'All Star'


class SeasonTypeAllStarNullable(_NotRequired, SeasonTypePlayoffs):
    pass

rsforbes avatar Feb 07 '21 13:02 rsforbes

Thanks for the response. I'm trying to get the ShotChartDetail for a player for all regular season and playoff games in their career. Is that possible?

robbylewis7 avatar Feb 07 '21 18:02 robbylewis7

@robbylewis7 If this is still an open question, please post to Slack.

rsforbes avatar Oct 01 '22 03:10 rsforbes