Serve the provider lineup at /api/lineup.json - #19
Merged
Merged
Conversation
One entry per channel position, sorted by number, with station metadata, Gracenote station filters, and the resolved logo. Provider name, type, and location come from the saved setup when it matches the lineup the guide was built from. Returns 503 with Retry-After until the first guide exists, matching /api/guide.json.
daniel-widrick
force-pushed
the
feature/lineup-model
branch
from
September 13, 2026 03:34
f9572f8 to
57eac5b
Compare
daniel-widrick
force-pushed
the
feature/lineup-endpoint
branch
from
September 13, 2026 03:34
a6d0b03 to
d9de550
Compare
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.
PR 3 of #15. Stacked on #18.
Changes
GET /api/lineup.json: every position in the active lineup, sorted by channel number, with station ID, placement ID, callsign, affiliate, affiliate callsign, Gracenote station filters, and the resolved logo URL. A station carried at two numbers appears twice.sourceblock carries the lineup identifiers from the guide itself. Provider name, type, and location are filled from the saved setup only when it describes the same lineup the guide was built from, so a stale guide can never be labeled with a newer provider's name.Retry-After: 30until the first guide exists, same CORS header and encoder settings as/api/guide.json.Tests
lineup_handler_test.gocovers: 503 before the first guide; full response decode with sort order, field mapping, and duplicate-station positions; exact JSON key sets at every level so a rename fails loudly, includingfiltersomitted when empty andlogoUrlalways present; provider naming blank with no config and blank when the config describes a different lineup; and that serialization sorts a copy rather than the live guide.