From 5076fae050ec7d655af300cde7674756c4381943 Mon Sep 17 00:00:00 2001 From: Alexander Fayad <47506431+alexfayad@users.noreply.github.com> Date: Wed, 19 Apr 2023 18:43:24 -0700 Subject: [PATCH] Update playbyplay.py (#337) --- src/nba_api/live/nba/endpoints/playbyplay.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nba_api/live/nba/endpoints/playbyplay.py b/src/nba_api/live/nba/endpoints/playbyplay.py index e5dba3c1..91f3ae58 100644 --- a/src/nba_api/live/nba/endpoints/playbyplay.py +++ b/src/nba_api/live/nba/endpoints/playbyplay.py @@ -2,8 +2,8 @@ from nba_api.live.nba.library.http import NBALiveHTTP class PlayByPlay(Endpoint): - endpoint_url = 'playbyplay/playbyplay_{game_id}.json' - expected_data = {'meta': {'version': 1, 'code': 200, 'request': 'http://nba.cloud/games/0022000180/playbyplay?Format=json', 'time': '2021-01-15 23:48:58.906160'}, 'game': {'gameId': '0022000180', 'actions': [{'actionNumber': 4, 'clock': 'PT11M58.00S', 'timeActual': '2021-01-16T00:40:31.3Z', 'period': 1, 'periodType': 'REGULAR', 'teamId': 1610612738, 'teamTricode': 'BOS', 'actionType': 'jumpball', 'subType': 'recovered', 'descriptor': 'startperiod', 'qualifiers': [], 'personId': 1629684, 'x': None, 'y': None, 'possession': 1610612738, 'scoreHome': '0', 'scoreAway': '0', 'edited': '2021-01-16T00:40:31Z', 'orderNumber': 40000, 'xLegacy': None, 'yLegacy': None, 'isFieldGoal': 0, 'jumpBallRecoveredName': 'G. Williams', 'jumpBallRecoverdPersonId': 1629684, 'side': None, 'playerName': 'Williams', 'playerNameI': 'G. Williams', 'personIdsFilter': [1629684, 202684, 202696], 'jumpBallWonPlayerName': 'Thompson', 'jumpBallWonPersonId': 202684, 'description': 'Jump Ball T. Thompson vs. N. Vucevic: Tip to G. Williams', 'jumpBallLostPlayerName': 'Vucevic', 'jumpBallLostPersonId': 202696}]}} + endpoint_url = 'https://cdn.nba.com/static/json/liveData/playbyplay/playbyplay_{game_id}.json' + expected_data = {'meta': {'version': 1, 'code': 200, 'request': 'https://cdn.nba.com/static/json/liveData/playbyplay/playbyplay_0022000180.json', 'time': '2021-01-15 23:48:58.906160'}, 'game': {'gameId': '0022000180', 'actions': [{'actionNumber': 4, 'clock': 'PT11M58.00S', 'timeActual': '2021-01-16T00:40:31.3Z', 'period': 1, 'periodType': 'REGULAR', 'teamId': 1610612738, 'teamTricode': 'BOS', 'actionType': 'jumpball', 'subType': 'recovered', 'descriptor': 'startperiod', 'qualifiers': [], 'personId': 1629684, 'x': None, 'y': None, 'possession': 1610612738, 'scoreHome': '0', 'scoreAway': '0', 'edited': '2021-01-16T00:40:31Z', 'orderNumber': 40000, 'xLegacy': None, 'yLegacy': None, 'isFieldGoal': 0, 'jumpBallRecoveredName': 'G. Williams', 'jumpBallRecoverdPersonId': 1629684, 'side': None, 'playerName': 'Williams', 'playerNameI': 'G. Williams', 'personIdsFilter': [1629684, 202684, 202696], 'jumpBallWonPlayerName': 'Thompson', 'jumpBallWonPersonId': 202684, 'description': 'Jump Ball T. Thompson vs. N. Vucevic: Tip to G. Williams', 'jumpBallLostPlayerName': 'Vucevic', 'jumpBallLostPersonId': 202696}]}} #Data Sets game = Endpoint.DataSet