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

#81 Bugfix: stats.player_game_log(), #82

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion nhlpy/api/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def player_game_log(self, player_id: str, season_id: str, game_type: int) -> Lis
:param player_id:
:return:
"""
return self.client.get(resource=f"player/{player_id}/game-log/{season_id}/{game_type}").json()["gameLog"]
data = self.client.get(resource=f"player/{player_id}/game-log/{season_id}/{game_type}").json()
return data.get("gameLog", [])

def team_summary(
self,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "nhl-api-py"
version = "2.12.3"
version = "2.12.4"
description = "NHL API (Updated for 2024/2025) and EDGE Stats. For standings, team stats, outcomes, player information. Contains each individual API endpoint as well as convience methods as well as pythonic query builder for more indepth EDGE stats."
authors = ["Corey Schaf <[email protected]>"]
readme = "README.md"
Expand Down
Loading