Skip to content

Conversation

williamwscode
Copy link

Description

Added functionality to provide categories within the system. Utilizes the filters provided by Gracenotes for events as categories for programme. Includes removal of 'filter-' identifier from all filters to provide conventional filter names. If no filter is provided in array, no category tag is added to programme.

Includes the following error prevention:

  • Provides no category in the event there is no filter tag provided in API response for an event.
  • Provides no category in the event that the filter naming convention is changed by Gracenotes.

Testing

  • Manually pulled API response to verify contents of response to align test file modifications to API response expectation.
  • Updated test file to include verification of new tags.
  • Included instance of a second tag to verify array functionality.
  • Included modification of existing category tag checks of minimal for missing language identifier (following XMLTV standard) to ensure that tags issues still did not occur.

Add testing for categories tag with provided filter information in API response
Added ability to create category XML tags within program based upon filter tags in API response.

Includes removal of 'filter-' from the filter parameter provided.
@williamwscode williamwscode requested a review from jef as a code owner August 28, 2025 04:34
@williamwscode williamwscode changed the title Added category tags as output following Added category tags Aug 28, 2025
@williamwscode williamwscode changed the title Added category tags feat: Added category tags Aug 28, 2025
jef
jef previously approved these changes Sep 8, 2025
Copy link
Owner

@jef jef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Fixed typographic error with bracket
Fixed typographical error
@williamwscode williamwscode requested a review from jef September 10, 2025 10:44
jef
jef previously approved these changes Sep 11, 2025
Refactored code to avoid Build tool thinking there might be an off chance that a filter would be an Undefined Object.

Both removed indexing and filtered out any undefined or null values before the loop begins.
Fixed usage of grave instead of single quote to maintain consistency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants