OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
radio.streaming_radio_backend_if.StreamingRadioFavoritesIf Class Reference

Storage capabilities needed by browser workers. More...

Public Member Functions

tuple[str,...] ordered_station_ids (self)
 Read ordered persisted favorite identifiers.
frozenset[str] station_ids (self)
 Read persisted favorite membership.
bool toggle (self, str station_id)
 Persist one membership change atomically.

Detailed Description

Storage capabilities needed by browser workers.

Member Function Documentation

◆ ordered_station_ids()

tuple[str, ...] radio.streaming_radio_backend_if.StreamingRadioFavoritesIf.ordered_station_ids ( self)

Read ordered persisted favorite identifiers.

Returns
Favorite identifiers in user order.

◆ station_ids()

frozenset[str] radio.streaming_radio_backend_if.StreamingRadioFavoritesIf.station_ids ( self)

Read persisted favorite membership.

Returns
Immutable favorite identifier set.

◆ toggle()

bool radio.streaming_radio_backend_if.StreamingRadioFavoritesIf.toggle ( self,
str station_id )

Persist one membership change atomically.

Parameters
station_idIdentifier whose membership should change.
Returns
Whether the station is now a favorite.

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