Implement: improve-view-vikes-tv.md - #3
Merged
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Auto-generated from vault spec
notes/improve-view-vikes-tv.md.Improve the
view-vikes-tvcommand in theemb417/libowski-botrepository to include the TV station(s) for each game. Currently, the command displays the schedule, but users have to look up the TV station elsewhere. I want the command to automatically fetch and display this information so it's all in one place.Expanded Spec
Problem
The
view-vikes-tvcommand insrc/commands/view-vikes-tv.jscurrently displays upcoming Minnesota Vikings games but lacks information about the TV station(s) broadcasting each game. Users must consult external sources to find this crucial detail, making the command less convenient than desired. The goal is to integrate TV station information directly into the command's output.Acceptance Criteria
/view-vikes-tvis executed, the output for each upcoming game must include the corresponding TV station(s).EmbedBuilderstructure for each game, likely as part of the game's field description.vikings.comschedule data as its primary source for game dates and opponents.Notes for implementer
src/commands/view-vikes-tv.jscommand currently scrapes game data fromhttps://www.vikings.com/schedule/using Cheerio to parsescript[type="application/ld+json"]tags. Investigate if the TV broadcast information is available within other HTML elements on this page or as part of theSportsEventJSON objects being parsed. This would be the most straightforward approach.vikings.comdoes not readily provide TV station data, consider external APIs or scraping. Thesrc/commands/view-blazers-tv.jscommand utilizeshttps://tvlistings.gracenote.com/api/sslgrid. While this specific Gracenote API call is tailored for the Portland Trail Blazers (e.g.,prgsvcid=62792,postalCode=97232), it demonstrates a method for fetching TV listings. Adapting this approach for the Vikings would require identifying the correctprgsvcidand appropriate geographical parameters for the target broadcast region. This might be significantly more complex due to the API's specific parameters.gameobjects. TheforEachloop responsible for building theEmbedBuilderfields inchatInputRunwill need modification to include this new information.User-Agentheader for any new HTTP requests to avoid being blocked, as seen in the existingview-vikes-tv.jsandview-blazers-tv.jscommands.