def __init__(
         self,
         league_id=constants.League.Default,
         season=constants.CURRENT_SEASON):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'LeagueID': league_id,
                                   'SeasonYear': season})
Esempio n. 2
0
 def __init__(
     self,
     date_from=constants.DateFrom.Default,
     date_to=constants.DateTo.Default,
     league_id=constants.League.Default,
     outcome=constants.Outcome.Default,
     playoff_round=constants.PlayoffRound.Default,
     per_mode=constants.PerMode.Default,
     season=constants.CURRENT_SEASON,
     season_type=constants.SeasonType.Default,
     def_team_id=constants.DefTeamID.Default,
     off_team_id=constants.OffTeamID.Default,
     def_player_id=constants.DefPlayerID.Default,
     off_player_id=constants.OffPlayerID.Default,
 ):
     self.json = _get_json(endpoint=self._endpoint,
                           params={
                               "LeagueID": league_id,
                               "Season": season,
                               "SeasonType": season_type,
                               "PORound": playoff_round,
                               "PerMode": per_mode,
                               "Outcome": outcome,
                               "DateFrom": date_from,
                               "DateTo": date_to,
                               "DefTeamID": def_team_id,
                               "OffTeamID": off_team_id,
                               "OffPlayerID": off_player_id,
                               "DefPlayerID": def_player_id
                           })
Esempio n. 3
0
 def __init__(self,
              league_id=League.NBA,
              season=CURRENT_SEASON,
              only_current=1):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'LeagueID': league_id,
                                   'Season': season,
                                   'IsOnlyCurrentSeason': only_current})
Esempio n. 4
0
 def __init__(self,
              player_id,
              per_mode=PerMode.PerGame,
              league_id=League.NBA):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'PlayerID': player_id,
                                   'LeagueID': league_id,
                                   'PerMode': per_mode})
Esempio n. 5
0
 def __init__(self,
              team_id,
              season_type=SeasonType.Default,
              per_mode=PerMode.Default):
     self.json = _get_json(endpoint=_endpoint,
                           params={'TeamID': team_id,
                                   'SeasonType': season_type,
                                   'PerMode': per_mode})
Esempio n. 6
0
 def __init__(self,
              team_id,
              season=CURRENT_SEASON,
              season_type=SeasonType.Default):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'TeamID': team_id,
                                   'Season': season,
                                   'SeasonType': season_type})
Esempio n. 7
0
 def __init__(self,
              player_id,
              per_mode=PerMode.PerGame,
              league_id=League.NBA):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'PlayerID': player_id,
                                   'LeagueID': league_id,
                                   'PerMode': per_mode})
Esempio n. 8
0
 def __init__(self,
              game_id,
              start_period=StartPeriod.Default,
              end_period=EndPeriod.Default):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'GameID': game_id,
                                   'StartPeriod': start_period,
                                   'EndPeriod': end_period})
Esempio n. 9
0
 def __init__(self,
              game_id,
              start_period=constants.StartPeriod.Default,
              end_period=constants.EndPeriod.Default):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'GameID': game_id,
                                   'StartPeriod': start_period,
                                   'EndPeriod': end_period})
Esempio n. 10
0
 def __init__(self,
              league_id=NBA_ID,
              season=CURRENT_SEASON,
              only_current=1):
     self.json = _get_json(endpoint='commonallplayers',
                           params={'LeagueID': league_id,
                                   'Season': season,
                                   'IsOnlyCurrentSeason': only_current})
Esempio n. 11
0
 def __init__(self,
              game_id,
              start_period=0,
              end_period=0):
     self.json = _get_json(endpoint='playbyplay',
                           params={'GameID': game_id,
                                   'StartPeriod': start_period,
                                   'EndPeriod': end_period})
Esempio n. 12
0
 def __init__(self,
              league_id=League.NBA,
              season=CURRENT_SEASON,
              only_current=1):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'LeagueID': league_id,
                                   'Season': season,
                                   'IsOnlyCurrentSeason': only_current})
Esempio n. 13
0
 def __init__(
     self,
     player_id,
     vs_player_id,
     team_id=0,
     measure_type=MeasureType.Default,
     per_mode=PerMode.Default,
     plus_minus=PlusMinus.Default,
     pace_adjust=PaceAdjust.Default,
     rank=PaceAdjust.Default,
     league_id=League.Default,
     season=CURRENT_SEASON,
     season_type=SeasonType.Default,
     po_round=PlayoffRound.Default,
     outcome=Outcome.Default,
     location=Location.Default,
     month=Month.Default,
     season_segment=SeasonSegment.Default,
     date_from=DateFrom.Default,
     date_to=DateTo.Default,
     opponent_team_id=OpponentTeamID.Default,
     vs_conference=VsConference.Default,
     vs_division=VsDivision.Default,
     game_segment=GameSegment.Default,
     period=Period.Default,
     shot_clock_range=ShotClockRange.Default,
     last_n_games=LastNGames.Default,
 ):
     self.json = _get_json(
         endpoint=self._endpoint,
         params={
             "PlayerID": player_id,
             "VsPlayerID": vs_player_id,
             "TeamID": team_id,
             "MeasureType": measure_type,
             "PerMode": per_mode,
             "PlusMinus": plus_minus,
             "PaceAdjust": pace_adjust,
             "Rank": rank,
             "LeagueID": league_id,
             "Season": season,
             "SeasonType": season_type,
             "PORound": po_round,
             "Outcome": outcome,
             "Location": location,
             "Month": month,
             "SeasonSegment": season_segment,
             "DateFrom": date_from,
             "DateTo": date_to,
             "OpponentTeamID": opponent_team_id,
             "VsConference": vs_conference,
             "VsDivision": vs_division,
             "GameSegment": game_segment,
             "Period": period,
             "ShotClockRange": shot_clock_range,
             "LastNGames": last_n_games,
         },
     )
Esempio n. 14
0
 def __init__(self,
              player_id,
              league_id=League.NBA,
              season=CURRENT_SEASON,
              season_type=SeasonType.Regular):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'PlayerID': player_id,
                                   'LeagueID': league_id,
                                   'Season': season,
                                   'SeasonType': season_type})
Esempio n. 15
0
 def __init__(self,
              team_id,
              season=CURRENT_SEASON,
              league_id=NBA_ID,
              season_type='Regular Season'):
     self.json = _get_json(endpoint='teaminfocommon',
                           params={'TeamID': team_id,
                                   'Season': season,
                                   'LeagueID': league_id,
                                   'SeasonType': season_type})
Esempio n. 16
0
 def __init__(self,
              team_id,
              league_id=constants.League.NBA,
              season_type=constants.SeasonType.Default,
              per_mode=constants.PerMode.Default):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'TeamID': team_id,
                                   'LeagueID': league_id,
                                   'SeasonType': season_type,
                                   'PerMode': per_mode})
Esempio n. 17
0
 def __init__(self,
              team_id,
              season=constants.CURRENT_SEASON,
              league_id=constants.League.NBA,
              season_type=constants.SeasonType.Default):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'TeamID': team_id,
                                   'Season': season,
                                   'LeagueID': league_id,
                                   'SeasonType': season_type})
Esempio n. 18
0
 def __init__(self,
              player_id,
              league_id=League.NBA,
              season=CURRENT_SEASON,
              season_type=SeasonType.Regular):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'PlayerID': player_id,
                                   'LeagueID': league_id,
                                   'Season': season,
                                   'SeasonType': season_type})
Esempio n. 19
0
    def __init__(
        self,
        player_id,
        team_id=TeamID.Default,
        game_id=GameID.Default,
        league_id=League.Default,
        season=CURRENT_SEASON,
        season_type=SeasonType.Default,
        outcome=Outcome.Default,
        location=Location.Default,
        month=Month.Default,
        season_segment=SeasonSegment.Default,
        date_from=DateFrom.Default,
        date_to=DateTo.Default,
        opponent_team_id=OpponentTeamID.Default,
        vs_conf=VsConference.Default,
        vs_div=VsDivision.Default,
        position=PlayerPosition.Default,
        game_segment=GameSegment.Default,
        period=Period.Default,
        last_n_games=LastNGames.Default,
        ahead_behind=AheadBehind.Default,
        context_measure=ContextMeasure.Default,
        clutch_time=ClutchTime.Default,
        rookie_year=RookieYear.Default,
    ):

        self.json = _get_json(
            endpoint=self._endpoint,
            params={
                "PlayerID": player_id,
                "TeamID": team_id,
                "GameID": game_id,
                "LeagueID": league_id,
                "Season": season,
                "SeasonType": season_type,
                "Outcome": outcome,
                "Location": location,
                "Month": month,
                "SeasonSegment": season_segment,
                "DateFrom": date_from,
                "DateTo": date_to,
                "OpponentTeamID": opponent_team_id,
                "VsConference": vs_conf,
                "VsDivision": vs_div,
                "Position": position,
                "GameSegment": game_segment,
                "Period": period,
                "LastNGames": last_n_games,
                "AheadBehind": ahead_behind,
                "ContextMeasure": context_measure,
                "ClutchTime": clutch_time,
                "RookieYear": rookie_year,
            },
        )
Esempio n. 20
0
    def __init__(self,
                 per_mode=constants.PerMode.Default,
                 league_id=constants.League.Default,
                 season=constants.CURRENT_SEASON,
                 season_type=constants.SeasonType.Default,
                 playoff_round=constants.PlayoffRound.Default,
                 outcome=constants.Outcome.Default,
                 location=constants.Location.Default,
                 month=constants.Month.Default,
                 season_segment=constants.SeasonSegment.Default,
                 date_from=constants.DateFrom.Default,
                 date_to=constants.DateTo.Default,
                 opponent_team_id=constants.OpponentTeamID.Default,
                 vs_conference=constants.VsConference.Default,
                 vs_division=constants.VsDivision.Default,
                 team_id=constants.TeamID.Default,
                 conference=constants.Conference.Default,
                 division=constants.Division.Default,
                 player_experience=constants.PlayerExperience.Default,
                 player_position=constants.PlayerPosition.Default,
                 draft_year=constants.DraftYear.Default,
                 draft_pick=constants.DraftPick.Default,
                 college=constants.College.Default,
                 country=constants.Country.Default,
                 height=constants.Height.Default,
                 weight=constants.Weight.Default):

        self.json = _get_json(endpoint=self._endpoint,
                              params={
                                  'PerMode': per_mode,
                                  'LeagueID': league_id,
                                  'Season': season,
                                  'SeasonType': season_type,
                                  'PORound': playoff_round,
                                  'Outcome': outcome,
                                  'Location': location,
                                  'Month': month,
                                  'SeasonSegment': season_segment,
                                  'DateFrom': date_from,
                                  'DateTo': date_to,
                                  'OpponentTeamID': opponent_team_id,
                                  'VsConference': vs_conference,
                                  'VsDivision': vs_division,
                                  'TeamID': team_id,
                                  'Conference': conference,
                                  'Division': division,
                                  'PlayerExperience': player_experience,
                                  'PlayerPosition': player_position,
                                  'DraftYear': draft_year,
                                  'DraftPick': draft_pick,
                                  'College': college,
                                  'Country': country,
                                  'Height': height,
                                  'Weight': weight
                              })
Esempio n. 21
0
 def __init__(self,
              player_id,
              vs_player_id,
              team_id=0,
              measure_type=constants.MeasureType.Default,
              per_mode=constants.PerMode.Default,
              plus_minus=constants.PlusMinus.Default,
              pace_adjust=constants.PaceAdjust.Default,
              rank=constants.PaceAdjust.Default,
              league_id=constants.League.Default,
              season=constants.CURRENT_SEASON,
              season_type=constants.SeasonType.Default,
              po_round=constants.PlayoffRound.Default,
              outcome=constants.Outcome.Default,
              location=constants.Location.Default,
              month=constants.Month.Default,
              season_segment=constants.SeasonSegment.Default,
              date_from=constants.DateFrom.Default,
              date_to=constants.DateTo.Default,
              opponent_team_id=constants.OpponentTeamID.Default,
              vs_conference=constants.VsConference.Default,
              vs_division=constants.VsDivision.Default,
              game_segment=constants.GameSegment.Default,
              period=constants.Period.Default,
              shot_clock_range=constants.ShotClockRange.Default,
              last_n_games=constants.LastNGames.Default):
     self.json = _get_json(endpoint=self._endpoint,
                           params={
                               'PlayerID': player_id,
                               'VsPlayerID': vs_player_id,
                               'TeamID': team_id,
                               'MeasureType': measure_type,
                               'PerMode': per_mode,
                               'PlusMinus': plus_minus,
                               'PaceAdjust': pace_adjust,
                               'Rank': rank,
                               'LeagueID': league_id,
                               'Season': season,
                               'SeasonType': season_type,
                               'PORound': po_round,
                               'Outcome': outcome,
                               'Location': location,
                               'Month': month,
                               'SeasonSegment': season_segment,
                               'DateFrom': date_from,
                               'DateTo': date_to,
                               'OpponentTeamID': opponent_team_id,
                               'VsConference': vs_conference,
                               'VsDivision': vs_division,
                               'GameSegment': game_segment,
                               'Period': period,
                               'ShotClockRange': shot_clock_range,
                               'LastNGames': last_n_games
                           })
Esempio n. 22
0
 def __init__(self,
              team_id,
              league_id=constants.League.NBA,
              season_type=constants.SeasonType.Default,
              per_mode=constants.PerMode.Default):
     self.json = _get_json(endpoint=self._endpoint,
                           params={
                               'TeamID': team_id,
                               'LeagueID': league_id,
                               'SeasonType': season_type,
                               'PerMode': per_mode
                           })
Esempio n. 23
0
 def __init__(self,
              team_id,
              season=constants.CURRENT_SEASON,
              league_id=constants.League.NBA,
              season_type=constants.SeasonType.Default):
     self.json = _get_json(endpoint=self._endpoint,
                           params={
                               'TeamID': team_id,
                               'Season': season,
                               'LeagueID': league_id,
                               'SeasonType': season_type
                           })
Esempio n. 24
0
 def __init__(self,
              team_id,
              season=CURRENT_SEASON,
              league_id=NBA_ID,
              season_type='Regular Season'):
     self.json = _get_json(endpoint='teaminfocommon',
                           params={
                               'TeamID': team_id,
                               'Season': season,
                               'LeagueID': league_id,
                               'SeasonType': season_type
                           })
Esempio n. 25
0
 def __init__(self,
              player_id,
              vs_player_id,
              team_id=0,
              measure_type=MeasureType.Default,
              per_mode=PerMode.Default,
              plus_minus=PlusMinus.Default,
              pace_adjust=PaceAdjust.Default,
              rank=PaceAdjust.Default,
              league_id=League.Default,
              season=CURRENT_SEASON,
              season_type=SeasonType.Default,
              po_round=PlayoffRound.Default,
              outcome=Outcome.Default,
              location=Location.Default,
              month=Month.Default,
              season_segment=SeasonSegment.Default,
              date_from=DateFrom.Default,
              date_to=DateTo.Default,
              opponent_team_id=OpponentTeamID.Default,
              vs_conference=VsConference.Default,
              vs_division=VsDivision.Default,
              game_segment=GameSegment.Default,
              period=Period.Default,
              shot_clock_range=ShotClockRange.Default,
              last_n_games=LastNGames.Default):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'PlayerID': player_id,
                                   'VsPlayerID': vs_player_id,
                                   'TeamID': team_id,
                                   'MeasureType': measure_type,
                                   'PerMode': per_mode,
                                   'PlusMinus': plus_minus,
                                   'PaceAdjust': pace_adjust,
                                   'Rank': rank,
                                   'LeagueID': league_id,
                                   'Season': season,
                                   'SeasonType': season_type,
                                   'PORound': po_round,
                                   'Outcome': outcome,
                                   'Location': location,
                                   'Month': month,
                                   'SeasonSegment': season_segment,
                                   'DateFrom': date_from,
                                   'DateTo': date_to,
                                   'OpponentTeamID': opponent_team_id,
                                   'VsConference': vs_conference,
                                   'VsDivision': vs_division,
                                   'GameSegment': game_segment,
                                   'Period': period,
                                   'ShotClockRange': shot_clock_range,
                                   'LastNGames': last_n_games})
Esempio n. 26
0
    def __init__(self,
                 player_id,
                 team_id=constants.TeamID.Default,
                 game_id=constants.GameID.Default,
                 league_id=constants.League.Default,
                 season=constants.CURRENT_SEASON,
                 season_type=constants.SeasonType.Default,
                 outcome=constants.Outcome.Default,
                 location=constants.Location.Default,
                 month=constants.Month.Default,
                 season_segment=constants.SeasonSegment.Default,
                 date_from=constants.DateFrom.Default,
                 date_to=constants.DateTo.Default,
                 opponent_team_id=constants.OpponentTeamID.Default,
                 vs_conf=constants.VsConference.Default,
                 vs_div=constants.VsDivision.Default,
                 position=constants.PlayerPosition.Default,
                 game_segment=constants.GameSegment.Default,
                 period=constants.Period.Default,
                 last_n_games=constants.LastNGames.Default,
                 ahead_behind=constants.AheadBehind.Default,
                 context_measure=constants.ContextMeasure.Default,
                 clutch_time=constants.ClutchTime.Default,
                 rookie_year=constants.RookieYear.Default):

        self.json = _get_json(endpoint=self._endpoint,
                              params={
                                  'PlayerID': player_id,
                                  'TeamID': team_id,
                                  'GameID': game_id,
                                  'LeagueID': league_id,
                                  'Season': season,
                                  'SeasonType': season_type,
                                  'Outcome': outcome,
                                  'Location': location,
                                  'Month': month,
                                  'SeasonSegment': season_segment,
                                  'DateFrom': date_from,
                                  'DateTo': date_to,
                                  'OpponentTeamID': opponent_team_id,
                                  'VsConference': vs_conf,
                                  'VsDivision': vs_div,
                                  'PlayerPosition': position,
                                  'GameSegment': game_segment,
                                  'Period': period,
                                  'LastNGames': last_n_games,
                                  'AheadBehind': ahead_behind,
                                  'ContextMeasure': context_measure,
                                  'ClutchTime': clutch_time,
                                  'RookieYear': rookie_year
                              })
Esempio n. 27
0
 def __init__(self,
              league_id=League.Default,
              per_mode=PerMode.Default,
              stat_category=StatCategory.Default,
              season=CURRENT_SEASON,
              season_type=SeasonType.Default,
              scope=Scope.Default,):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'LeagueID': league_id,
                                   'PerMode': per_mode,
                                   'StatCategory': stat_category,
                                   'Season': season,
                                   'SeasonType': season_type,
                                   'Scope': scope})
Esempio n. 28
0
 def __init__(self,
              game_id,
              range_type=RangeType.Default,
              start_period=StartPeriod.Default,
              end_period=EndPeriod.Default,
              start_range=StartRange.Default,
              end_range=EndRange.Default):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'GameID': game_id,
                                   'RangeType': range_type,
                                   'StartPeriod': start_period,
                                   'EndPeriod': end_period,
                                   'StartRange': start_range,
                                   'EndRange': end_range})
Esempio n. 29
0
 def __init__(self,
              league_id=League.Default,
              per_mode=PerMode.Default,
              stat_category=StatCategory.Default,
              season=CURRENT_SEASON,
              season_type=SeasonType.Default,
              scope=Scope.Default,):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'LeagueID': league_id,
                                   'PerMode': per_mode,
                                   'StatCategory': stat_category,
                                   'Season': season,
                                   'SeasonType': season_type,
                                   'Scope': scope})
Esempio n. 30
0
 def __init__(self,
              league=League.NBA,
              permode=PerMode.PerGame,
              season=CURRENT_SEASON,
              season_type=SeasonType.Default,
              defense=DefenseCategory.Less15ft):
     self.json = _get_json(endpoint=self._endpoint,
                           params={
                               'LeagueID': league,
                               'Season': season,
                               'SeasonType': season_type,
                               'PerMode': permode,
                               'DefenseCategory': defense
                           })
Esempio n. 31
0
 def __init__(self,
              game_id,
              range_type=0,
              start_period=0,
              end_period=0,
              start_range=0,
              end_range=0):
     self.json = _get_json(endpoint='boxscore',
                           params={'GameID': game_id,
                                   'RangeType': range_type,
                                   'StartPeriod': start_period,
                                   'EndPeriod': end_period,
                                   'StartRange': start_range,
                                   'EndRange': end_range})
Esempio n. 32
0
 def __init__(self,
              team_id,
              game_id='',
              group_quantity=constants.GroupQuantity.Default,
              season=constants.CURRENT_SEASON,
              season_type=constants.SeasonType.Default,
              measure_type=constants.MeasureType.Default,
              per_mode=constants.PerMode.Default,
              plus_minus=constants.PlusMinus.Default,
              pace_adjust=constants.PaceAdjust.Default,
              rank=constants.Rank.Default,
              outcome=constants.Outcome.Default,
              location=constants.Location.Default,
              month=constants.Month.Default,
              season_segment=constants.SeasonSegment.Default,
              date_from=constants.DateFrom.Default,
              date_to=constants.DateTo.Default,
              opponent_team_id=constants.OpponentTeamID.Default,
              vs_conference=constants.VsConference.Default,
              vs_division=constants.VsDivision.Default,
              game_segment=constants.GameSegment.Default,
              period=constants.Period.Default,
              last_n_games=constants.LastNGames.Default):
     self.json = _get_json(endpoint=self._endpoint,
                           params={
                               'GroupQuantity': group_quantity,
                               'GameID': game_id,
                               'TeamID': team_id,
                               'Season': season,
                               'SeasonType': season_type,
                               'MeasureType': measure_type,
                               'PerMode': per_mode,
                               'PlusMinus': plus_minus,
                               'PaceAdjust': pace_adjust,
                               'Rank': rank,
                               'Outcome': outcome,
                               'Location': location,
                               'Month': month,
                               'SeasonSegment': season_segment,
                               'DateFrom': date_from,
                               'DateTo': date_to,
                               'OpponentTeamID': opponent_team_id,
                               'VsConference': vs_conference,
                               'VsDivision': vs_division,
                               'GameSegment': game_segment,
                               'Period': period,
                               'LastNGames': last_n_games
                           })
Esempio n. 33
0
 def __init__(self,
              player_id,
              measure_type='Base',
              per_mode='PerGame',
              plus_minus='N',
              pace_adjust='N',
              rank='N',
              league_id=NBA_ID,
              season=CURRENT_SEASON,
              season_type='Regular Season',
              po_round='',
              outcome='',
              location='',
              month=0,
              season_segment='',
              date_from='',
              date_to='',
              opponent_team_id=0,
              vs_conference='',
              vs_division='',
              game_segment='',
              period=0,
              shot_clock_range='',
              last_n_games=0):
     self.json = _get_json(endpoint='playerdashboardbygeneralsplits',
                           params={'PlayerID': player_id,
                                   'MeasureType': measure_type,
                                   'PerMode': per_mode,
                                   'PlusMinus': plus_minus,
                                   'PaceAdjust': pace_adjust,
                                   'Rank': rank,
                                   'LeagueID': league_id,
                                   'Season': season,
                                   'SeasonType': season_type,
                                   'PORound': po_round,
                                   'Outcome': outcome,
                                   'Location': location,
                                   'Month': month,
                                   'SeasonSegment': season_segment,
                                   'DateFrom': date_from,
                                   'DateTo': date_to,
                                   'OpponentTeamID': opponent_team_id,
                                   'VsConference': vs_conference,
                                   'VsDivision': vs_division,
                                   'GameSegment': game_segment,
                                   'Period': period,
                                   'ShotClockRange': shot_clock_range,
                                   'LastNGames': last_n_games})
Esempio n. 34
0
 def __init__(self,
              league_id=League.Default,
              season=CURRENT_SEASON,
              season_type=SeasonType.Default,
              game_scope=GameScope.Default,
              player_scope=PlayerScope.Default,
              player_or_team=PlayerOrTeam.Default,
              stat_category=StatCategory.Default):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'LeagueID': league_id,
                                   'Stat': stat_category,
                                   'Season': season,
                                   'SeasonType': season_type,
                                   'GameScope': game_scope,
                                   'PlayerScope': player_scope,
                                   'PlayerOrTeam': player_or_team})
Esempio n. 35
0
 def __init__(self,
              league_id=League.Default,
              season=CURRENT_SEASON,
              season_type=SeasonType.Default,
              game_scope=GameScope.Default,
              player_scope=PlayerScope.Default,
              player_or_team=PlayerOrTeam.Default,
              stat_category=StatCategory.Default):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'LeagueID': league_id,
                                   'Stat': stat_category,
                                   'Season': season,
                                   'SeasonType': season_type,
                                   'GameScope': game_scope,
                                   'PlayerScope': player_scope,
                                   'PlayerOrTeam': player_or_team})
Esempio n. 36
0
 def __init__(self,
              game_id,
              range_type=RangeType.Default,
              start_period=StartPeriod.Default,
              end_period=EndPeriod.Default,
              start_range=StartRange.Default,
              end_range=EndRange.Default):
     self.json = _get_json(endpoint=self._endpoint,
                           params={
                               'GameID': game_id,
                               'RangeType': range_type,
                               'StartPeriod': start_period,
                               'EndPeriod': end_period,
                               'StartRange': start_range,
                               'EndRange': end_range
                           })
Esempio n. 37
0
File: team.py Progetto: wele/nba_py
 def __init__(self,
              team_id,
              game_id='',
              group_quantity=GroupQuantity.Default,
              season=CURRENT_SEASON,
              season_type=SeasonType.Default,
              measure_type=MeasureType.Default,
              per_mode=PerMode.Default,
              plus_minus=PlusMinus.Default,
              pace_adjust=PaceAdjust.Default,
              rank=Rank.Default,
              outcome=Outcome.Default,
              location=Location.Default,
              month=Month.Default,
              season_segment=SeasonSegment.Default,
              date_from=DateFrom.Default,
              date_to=DateTo.Default,
              opponent_team_id=OpponentTeamID.Default,
              vs_conference=VsConference.Default,
              vs_division=VsDivision.Default,
              game_segment=GameSegment.Default,
              period=Period.Default,
              last_n_games=LastNGames.Default):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'GroupQuantity': group_quantity,
                                   'GameID': game_id,
                                   'TeamID': team_id,
                                   'Season': season,
                                   'SeasonType': season_type,
                                   'MeasureType': measure_type,
                                   'PerMode': per_mode,
                                   'PlusMinus': plus_minus,
                                   'PaceAdjust': pace_adjust,
                                   'Rank': rank,
                                   'Outcome': outcome,
                                   'Location': location,
                                   'Month': month,
                                   'SeasonSegment': season_segment,
                                   'DateFrom': date_from,
                                   'DateTo': date_to,
                                   'OpponentTeamID': opponent_team_id,
                                   'VsConference': vs_conference,
                                   'VsDivision': vs_division,
                                   'GameSegment': game_segment,
                                   'Period': period,
                                   'LastNGames': last_n_games})
Esempio n. 38
0
 def __init__(self,
              game_id,
              season=constants.CURRENT_SEASON,
              season_type=constants.SeasonType.Default,
              range_type=constants.RangeType.Default,
              start_period=constants.StartPeriod.Default,
              end_period=constants.EndPeriod.Default,
              start_range=constants.StartRange.Default,
              end_range=constants.EndRange.Default):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'GameID': game_id,
                                   'Season': season,
                                   'SeasonType': season_type,
                                   'RangeType': range_type,
                                   'StartPeriod': start_period,
                                   'EndPeriod': end_period,
                                   'StartRange': start_range,
                                   'EndRange': end_range})
Esempio n. 39
0
    def __init__(self,
                 league_id=League.Default,
                 season=CURRENT_SEASON,
                 season_type=SeasonType.Default,
                 player_or_team=Player_or_Team.Default,
                 counter=Counter.Default,
                 sorter=Sorter.Default,
                 direction=Direction.Default,
                 ):

        self.json = _get_json(endpoint=self._endpoint,
                              params={'LeagueID': league_id,
                                      'Season': season,
                                      'SeasonType': season_type,
                                      'PlayerOrTeam': player_or_team,
                                      'Counter': counter,
                                      'Sorter': sorter,
                                      'Direction': direction
                                      })
Esempio n. 40
0
    def __init__(self,
                 league_id=League.Default,
                 season=CURRENT_SEASON,
                 season_type=SeasonType.Default,
                 player_or_team=Player_or_Team.Default,
                 counter=Counter.Default,
                 sorter=Sorter.Default,
                 direction=Direction.Default,
                 ):

        self.json = _get_json(endpoint=self._endpoint,
                              params={'LeagueID': league_id,
                                      'Season': season,
                                      'SeasonType': season_type,
                                      'PlayerOrTeam': player_or_team,
                                      'Counter': counter,
                                      'Sorter': sorter,
                                      'Direction': direction
                                      })
Esempio n. 41
0
 def __init__(self,
              game_id,
              season=constants.CURRENT_SEASON,
              season_type=constants.SeasonType.Default,
              range_type=constants.RangeType.Default,
              start_period=constants.StartPeriod.Default,
              end_period=constants.EndPeriod.Default,
              start_range=constants.StartRange.Default,
              end_range=constants.EndRange.Default):
     self.json = _get_json(endpoint=self._endpoint,
                           params={
                               'GameID': game_id,
                               'Season': season,
                               'SeasonType': season_type,
                               'RangeType': range_type,
                               'StartPeriod': start_period,
                               'EndPeriod': end_period,
                               'StartRange': start_range,
                               'EndRange': end_range
                           })
Esempio n. 42
0
 def __init__(
     self,
     game_id,
     range_type=RangeType.Default,
     start_period=StartPeriod.Default,
     end_period=EndPeriod.Default,
     start_range=StartRange.Default,
     end_range=EndRange.Default,
 ):
     self.json = _get_json(
         endpoint=self._endpoint,
         params={
             "GameID": game_id,
             "RangeType": range_type,
             "StartPeriod": start_period,
             "EndPeriod": end_period,
             "StartRange": start_range,
             "EndRange": end_range,
         },
     )
Esempio n. 43
0
    def __init__(self,
                 league_id=constants.League.Default,
                 season=constants.CURRENT_SEASON,
                 season_type=constants.SeasonType.Default,
                 player_or_team=constants.Player_or_Team.Default,
                 counter=constants.Counter.Default,
                 sorter=constants.Sorter.Default,
                 direction=constants.Direction.Default,
                 date_from=constants.DateFrom.Default,
                 date_to=constants.DateTo.Default):

        self.json = _get_json(endpoint=self._endpoint,
                              params={
                                  'LeagueID': league_id,
                                  'Season': season,
                                  'SeasonType': season_type,
                                  'PlayerOrTeam': player_or_team,
                                  'Counter': counter,
                                  'Sorter': sorter,
                                  'Direction': direction,
                                  'DateFrom': date_from,
                                  'DateTo': date_to
                              })
Esempio n. 44
0
 def __init__(self, player_id):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'PlayerID': player_id})
Esempio n. 45
0
 def __init__(self,
              game_id):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'GameID': game_id})
Esempio n. 46
0
 def __init__(self, team_id, season=constants.CURRENT_SEASON):
     self.json = _get_json(endpoint=self._endpoint,
                           params={
                               'TeamID': team_id,
                               'Season': season
                           })
Esempio n. 47
0
 def __init__(self, league_id=constants.League.NBA):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'LeagueID': league_id})
Esempio n. 48
0
 def __init__(self, team_id):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'TeamID': team_id})
Esempio n. 49
0
 def __init__(self,
              player_id):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'PlayerID': player_id})
Esempio n. 50
0
 def __init__(self, player_id, league_id=League.NBA, season=CURRENT_SEASON, season_type=SeasonType.Regular):
     self.json = _get_json(
         endpoint=self._endpoint,
         params={"PlayerID": player_id, "LeagueID": league_id, "Season": season, "SeasonType": season_type},
     )
Esempio n. 51
0
File: team.py Progetto: wele/nba_py
 def __init__(self,
              team_id,
              season=CURRENT_SEASON):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'TeamID': team_id,
                                   'Season': season})
Esempio n. 52
0
File: team.py Progetto: wele/nba_py
 def __init__(self,
              league_id=League.NBA):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'LeagueID': league_id})
Esempio n. 53
0
 def __init__(self,
              season_type=SeasonType.Default,
              measure_type=MeasureType.Default,
              per_mode=PerMode.Default,
              plus_minus=PlusMinus.Default,
              pace_adjust=PaceAdjust.Default,
              rank=Rank.Default,
              season=CURRENT_SEASON,
              playoff_round=PlayoffRound.Default,
              outcome=Outcome.Default,
              location=Location.Default,
              month=Month.Default,
              season_segment=SeasonSegment.Default,
              date_from=DateFrom.Default,
              date_to=DateTo.Default,
              opponent_team_id=OpponentTeamID.Default,
              vs_conference=VsConference.Default,
              vs_division=VsDivision.Default,
              team_id=TeamID.Default,
              conference=Conference.Default,
              division=Division.Default,
              game_segment=GameSegment.Default,
              period=Period.Default,
              shot_clock_range=ShotClockRange.Default,
              last_n_games=LastNGames.Default,
              game_scope=Game_Scope.Default,
              player_experience=PlayerExperience.Default,
              player_position=PlayerPosition.Default,
              starter_bench=StarterBench.Default,
              draft_year=DraftYear.Default,
              draft_pick=DraftPick.Default,
              college=College.Default,
              country=Country.Default,
              height=Height.Default,
              weight=Weight.Default
              ):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'SeasonType': season_type,
                                   'MeasureType': measure_type,
                                   'PerMode': per_mode,
                                   'PlusMinus': plus_minus,
                                   'PaceAdjust': pace_adjust,
                                   'Rank': rank,
                                   'Season': season,
                                   'PORound': playoff_round,
                                   'Outcome': outcome,
                                   'Location': location,
                                   'Month': month,
                                   'SeasonSegment': season_segment,
                                   'DateFrom': date_from,
                                   'DateTo': date_to,
                                   'OpponentTeamID': opponent_team_id,
                                   'VsConference': vs_conference,
                                   'VsDivision': vs_division,
                                   'TeamID': team_id,
                                   'Conference': conference,
                                   'Division': division,
                                   'GameSegment': game_segment,
                                   'Period': period,
                                   'ShotClockRange': shot_clock_range,
                                   'LastNGames': last_n_games,
                                   'GameScope': game_scope,
                                   'PlayerExperience': player_experience,
                                   'PlayerPosition': player_position,
                                   'StarterBench': starter_bench,
                                   'DraftYear': draft_year,
                                   'DraftPick': draft_pick,
                                   'College': college,
                                   'Country': country,
                                   'Height': height,
                                   'Weight': weight
                                   })
Esempio n. 54
0
File: team.py Progetto: wele/nba_py
 def __init__(self, team_id):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'TeamID': team_id})
Esempio n. 55
0
 def __init__(self, league_id=League.Default, season=CURRENT_SEASON):
     self.json = _get_json(endpoint=self._endpoint,
                           params={'LeagueID': league_id,
                                   'SeasonYear': season})
Esempio n. 56
0
 def __init__(self, league_id=League.NBA, season=CURRENT_SEASON, only_current=1):
     self.json = _get_json(
         endpoint=self._endpoint,
         params={"LeagueID": league_id, "Season": season, "IsOnlyCurrentSeason": only_current},
     )