Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong name nba_response and DataSet(data=data_set) #340

Merged
merged 1 commit into from
May 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"])