本文整理汇总了Python中nba_py._get_json函数的典型用法代码示例。如果您正苦于以下问题:Python _get_json函数的具体用法?Python _get_json怎么用?Python _get_json使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_get_json函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
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})
示例2: __init__
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})
示例3: __init__
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})
示例4: __init__
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})
示例5: __init__
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})
示例6: __init__
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,
},
)
示例7: __init__
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})
示例8: __init__
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})
示例9: __init__
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,
},
)
示例10: __init__
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})
示例11: __init__
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})
示例12: __init__
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,
},
)
示例13: __init__
def __init__(self, league_id=League.Default, season=CURRENT_SEASON):
self.json = _get_json(endpoint=self._endpoint,
params={'LeagueID': league_id,
'SeasonYear': season})