-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for the wsc/game-story API endpoint
- Loading branch information
1 parent
a600b0c
commit b27ad27
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from nhlpy.http_client import HttpClient | ||
|
||
class Wsc: | ||
def __init__(self, http_client: HttpClient): | ||
self.client = http_client | ||
|
||
def game_story(self, game_id: str) -> dict: | ||
""" | ||
Get game story information for the game id. GameIds can be retrieved from the schedule endpoint. | ||
:param game_id: The game_id for the game you want the game story for. | ||
:return: dict | ||
""" | ||
return self.client.get(resource=f"wsc/game-story/{game_id}").json() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters