OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
radio.streaming_radio_directory_if.StreamingRadioDirectoryIf Class Reference

Directory abstraction for discovering internet-radio stations. More...

Public Member Functions

tuple[StreamingRadioStation,...] search (self, str query, *, int limit=20)
 Find stations whose names match a user query.
tuple[StreamingRadioStation,...] stations_by_ids (self, tuple[str,...] station_ids)
 Resolve stable directory identifiers to current station metadata.
tuple[StreamingRadioStation,...] stations_by_region (self, *, str state, str country_code="US", int limit=50)
 Return healthy stations for a state or regional label.
tuple[StreamingRadioStation,...] stations_near (self, *, float latitude, float longitude, float radius_km, str state, str country_code="US", int limit=50)
 Return stations near a position with regional fallback.

Detailed Description

Directory abstraction for discovering internet-radio stations.

Member Function Documentation

◆ search()

tuple[StreamingRadioStation, ...] radio.streaming_radio_directory_if.StreamingRadioDirectoryIf.search ( self,
str query,
* ,
int limit = 20 )

Find stations whose names match a user query.

Parameters
queryUser-entered station search text.
limitMaximum number of stations to return.
Returns
Matching stations in directory-defined order.

◆ stations_by_ids()

tuple[StreamingRadioStation, ...] radio.streaming_radio_directory_if.StreamingRadioDirectoryIf.stations_by_ids ( self,
tuple[str, ...] station_ids )

Resolve stable directory identifiers to current station metadata.

Parameters
station_idsStable directory station identifiers to resolve.
Returns
Resolved stations in the requested identifier order when available.

◆ stations_by_region()

tuple[StreamingRadioStation, ...] radio.streaming_radio_directory_if.StreamingRadioDirectoryIf.stations_by_region ( self,
* ,
str state,
str country_code = "US",
int limit = 50 )

Return healthy stations for a state or regional label.

Parameters
stateState or regional label used to constrain discovery.
country_codeISO-style country code used to constrain discovery.
limitMaximum number of stations to return.
Returns
Healthy stations matching the requested region.

◆ stations_near()

tuple[StreamingRadioStation, ...] radio.streaming_radio_directory_if.StreamingRadioDirectoryIf.stations_near ( self,
* ,
float latitude,
float longitude,
float radius_km,
str state,
str country_code = "US",
int limit = 50 )

Return stations near a position with regional fallback.

Parameters
latitudeLatitude of the discovery origin in degrees.
longitudeLongitude of the discovery origin in degrees.
radius_kmSearch radius in kilometers.
stateState or regional fallback label for stations missing geo metadata.
country_codeISO-style country code used to constrain discovery.
limitMaximum number of stations to return.
Returns
Nearby stations plus regional fallback stations when appropriate.

The documentation for this class was generated from the following file:
  • controllers/radio/streaming_radio_directory_if.py