Skip to content

Commit

Permalink
Fix wrong name nba_response and DataSet(data=data_set) (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
shufinskiy authored May 5, 2023
1 parent 82d6b8d commit 253fb5b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/nba_api/stats/endpoints/playerindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,17 @@ def __init__(self,
self.get_request()

def get_request(self):
self.nba_responce = NBAStatsHTTP().send_api_request(
self.nba_response = NBAStatsHTTP().send_api_request(
endpoint=self.endpoint,
parameters=self.parameters,
proxy=self.proxy,
headers=self.headers,
timeout=self.timeout
)
self.load_responce()
self.load_response()

def load_responce(self):
data_sets = self.nba_responce.get_data_sets()
self.data_sets = [Endpoint.DataSet(data=data_sets) for data_set_name, data_set in data_sets.items()]
def load_response(self):
data_sets = self.nba_response.get_data_sets()
self.data_sets = [Endpoint.DataSet(data=data_set) for data_set_name, data_set in data_sets.items()]
self.player_index = Endpoint.DataSet(data=data_sets["PlayerIndex"])

0 comments on commit 253fb5b

Please sign in to comment.