nhl-api-py icon indicating copy to clipboard operation
nhl-api-py copied to clipboard

Game Summaries or News Articles related to GameID

Open Btibert3 opened this issue 6 months ago • 3 comments

This is a complete shot in the dark, but I am looking to connect the data from a given game to written summaries or articles about the game. An ideal state is a strong connection between the news article(s) and the game id.

I explored the summary key from the play by play call, but for last night's game, the entry is empty.

from nhlpy import NHLClient
client = NHLClient()

# game 2 ECF Panthers at Canes
gid = '2024030312'

pbp = client.game_center.play_by_play(game_id=gid)

pbp.keys()
# dict_keys(['id', 'season', 'gameType', 'limitedScoring', 'gameDate', 'venue', 'venueLocation', 'startTimeUTC', 'easternUTCOffset', 'venueUTCOffset', 'tvBroadcasts', 'gameState', 'gameScheduleState', 'periodDescriptor', 'awayTeam', 'homeTeam', 'shootoutInUse', 'otInUse', 'clock', 'displayPeriod', 'gameOutcome', 'plays', 'rosterSpots', 'regPeriods', 'summary'])

pbp.get('summary')
# {}

I wasn't sure if there were data that I am overlooking, but as noted above, figured this is a long shot.

Btibert3 avatar May 23 '25 16:05 Btibert3

client.game_center.game_story("2024030311") has direct links to the goals I believe. summary seems to be empty for every game, I tried random ones from the season.

Im not fully understanding the goal here, are you seeing if any of the endpoints can return any related news articles directly in the API response?


client.game_center.right_rail("2024030312") will return not articles but data such as

https://www.nhl.com/scores/htmlreports/20242025/GS030312.HTM

coreyjs avatar May 25 '25 19:05 coreyjs

I have an idea I want to explore: connecting play-by-play data to (presumably) human-written game summaries, such as the articles posted on the site. As I noted above, I assumed this was a shot in the dark, but I was encouraged when I found the summary key via the play-by-play flow.

On the site, if you go to the gamecenter entry for Game 3 WCF, the news article is front and center. It links to: https://www.nhl.com/news/dallas-stars-edmonton-oilers-game-3-recap-may-25.

I was hoping that I missed some references in the API responses that may have made that connection for us, as sometimes there are references to video links for a replay. I wasn't sure if I was overlooking something similar for news summaries.

Btibert3 avatar May 26 '25 14:05 Btibert3

There is nothing in this lib currently that has that data. But I was digging around a bit on the site, it does look like there may be some avenues here, for instance something like:

https://forge-dapi.d3.nhle.com/v2/content/en-us/stories?tags.slug=gameid-2024030323&tags.slug=game-recap&context.slug=nhl

Is reproducible with game data, but there does seem to be a missing link, from how they connect this to the article data, I havent found that yet.

coreyjs avatar May 26 '25 14:05 coreyjs

Thanks for poking around, you are a wizard for even finding that reference!

Btibert3 avatar May 31 '25 13:05 Btibert3