Skip to content

Look up several stations by UUID, or by stream URL - #1580

Merged
frenck merged 1 commit into
mainfrom
frenck/station-lookups
Oct 1, 2026
Merged

frenck merged 1 commit into
mainfrom
frenck/station-lookups

Conversation

@frenck

@frenck frenck commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Breaking change

None. Two new methods.

Proposed change

Two lookups the API documents but the library did not offer:

  • stations_by_uuid(uuids=[...]) gets several stations in a single request, through stations/byuuid?uuids=.... Refreshing a list of 30 favorite stations used to take 30 requests through station(). UUIDs of stations that no longer exist are simply left out of the result. An empty list returns [] without a request.
  • stations_by_url(url=...) gets the stations behind a stream URL, through stations/byurl. Several stations can share a stream, so it returns a list.

Parsing a list of stations now lives in one stations_from_json() helper, instead of the same block in search(), stations() and now these two.

Checked against the live API: two known UUIDs plus one unknown return the two known stations, and the stream URL of Classic Vinyl HD returns the eleven stations that use it. Both are in the README.

Type of change

  • Dependency or tooling upgrade
  • Bugfix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Deprecation (replaces or removes a feature, with a migration path)
  • Breaking change (a fix or feature that changes existing behavior)
  • Code quality, refactor, or test-only change
  • Documentation only

Additional information

  • This PR fixes or closes issue: fixes # None
  • This PR is related to: None
  • Link to a separate documentation pull request: None

Checklist

  • I fully understand the code in this pull request and can explain every line, including any AI-assisted changes.
  • The change is covered by tests, and poetry run pytest passes locally. A pull request cannot be merged unless CI is green.
  • poetry run prek run --all-files passes (lint, format, and type checks).
  • No commented-out or dead code is left in the pull request.

Add stations_by_uuid() to get several stations in one request, and
stations_by_url() to find the stations behind a stream URL. Parse lists
of stations in one helper.
@frenck frenck added the new-feature New features or options. label Oct 1, 2026
@frenck
frenck merged commit 6b49df7 into main Oct 1, 2026
31 checks passed
@frenck frenck mentioned this pull request Oct 1, 2026
4 of 11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature New features or options.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant