Skip to content

Get the check and click history of stations - #1585

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

frenck merged 1 commit into
mainfrom
frenck/station-history

Conversation

@frenck

@frenck frenck commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Breaking change

None. Two new methods and two new models.

Proposed change

Adds the station history endpoints the API documents:

  • checks() returns the checks the Radio Browser servers run on stations: whether a stream was online, its codec and bitrate, what the stream reports about itself, and how long it took. With a station UUID, it is that station's history, which helps to find out why a stream does not play. Without one, it is the latest check of every station.
  • clicks() returns when stations were played.

Both take uuid, seconds (only the last so many seconds), limit, and after to continue after the UUID of an earlier check or click, which is how the API pages through these lists. A negative limit or seconds raises a ValueError.

The new StationCheck and StationClick models only require the fields a check or click always has. Checked against 200 live check results: everything a stream reports about itself (name, tags, country, homepage, favicon, location and more) can be null, so those fields default to None or an empty list. CommaSeparatedString now accepts null for that reason.

Live: the last 30 days of checks for a station come back as expected, and after= continues right after the last click of an earlier call. Documented in a new "Station history" section of 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 checks() and clicks(), with StationCheck and StationClick models, for
the check and click history of one station or of all stations.
@frenck frenck added the new-feature New features or options. label Oct 1, 2026
@frenck
frenck merged commit 2c58c1b into main Oct 1, 2026
31 checks passed
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