Skip to content

Commit

Permalink
Update playbyplay.py (swar#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfayad authored Apr 20, 2023
1 parent 05f91be commit 5076fae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nba_api/live/nba/endpoints/playbyplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5076fae

Please sign in to comment.