sounds.models¶
Attributes¶
Classes¶
Base class for all objects with common functionality. |
|
Represents a network/brand with basic metadata. |
|
Base container for organizing content - not directly playable. |
|
Base container for organizing content - not directly playable. |
|
Base class for actual playable content. |
|
Mixin for content with timing information. |
|
Represents a broadcast item. |
|
Represents a scheduled program item. |
|
Represents a radio/media station. |
|
Represents a search result showing a station. Keys are different enough to warrant a separate model |
|
Base class for actual playable content. |
|
Base class for actual playable content. |
|
Represents a station stream. |
|
Represents a segment within a stream. |
|
Represents a schedule for a given date. |
|
Represents a playable radio show. |
|
Represents a playable radio clip. |
|
Represents a playable podcast episode. |
|
Represents a podcast container (holds episodes). |
|
Represents a radio series container (holds episodes). |
|
Represents a collection container. |
|
Represents a content category. |
|
Represents a content category container. |
|
Represents a playlist container. |
|
Represents a content collection container. |
|
Represents a menu item container. |
|
Represents a recommended menu item. |
|
Represents a menu container with items. |
|
Base container for organizing content - not directly playable. |
|
Base container for organizing content - not directly playable. |
|
Base class for all objects with common functionality. |
Functions¶
|
Module Contents¶
- type sounds.models.SoundsTypes = models.Category | models.CategoryItemContainer | models.Container | models.Collection | models.LiveStation | models.MenuItem | models.Podcast | models.PodcastEpisode | models.RadioClip | models.RadioSeries | models.RadioShow | models.RecommendedMenuItem | models.Segment | models.Schedule | models.ScheduleItem | models.Station | models.StationSearchResult¶
- class sounds.models.BaseObject¶
Bases:
SerializableMixinBase class for all objects with common functionality.
- class sounds.models.Network¶
Bases:
SerializableMixinRepresents a network/brand with basic metadata.
- current_programme: LiveProgramme | None = None¶
- class sounds.models.Container¶
Bases:
BaseObject,IdentifiableMixinBase container for organizing content - not directly playable.
- sub_items: List[SoundsTypes] | None = None¶
- class sounds.models.ImageContainer¶
Bases:
ContainerBase container for organizing content - not directly playable.
- IMAGE_SIZE = 1280¶
- class sounds.models.PlayableItem¶
Bases:
BaseObject,IdentifiableMixinBase class for actual playable content.
- start: datetime.datetime | None = None¶
- end: datetime.datetime | None = None¶
- is_live(timezone: zoneinfo.ZoneInfo | pytz.tzinfo.BaseTzInfo) bool¶
- has_already_aired(timezone: zoneinfo.ZoneInfo | pytz.tzinfo.BaseTzInfo) bool¶
- class sounds.models.TimedContent¶
Mixin for content with timing information.
- is_live(timezone: zoneinfo.ZoneInfo | pytz.tzinfo.BaseTzInfo) bool¶
- has_already_aired(timezone: zoneinfo.ZoneInfo | pytz.tzinfo.BaseTzInfo) bool¶
- class sounds.models.Broadcast¶
Represents a broadcast item.
- start: datetime.datetime¶
- end: datetime.datetime¶
- class sounds.models.ScheduleItem¶
Bases:
ImageMixin,PlayableItemRepresents a scheduled program item.
- class sounds.models.StationSearchResult¶
Bases:
SerializableMixin,IdentifiableMixinRepresents a search result showing a station. Keys are different enough to warrant a separate model
- class sounds.models.LiveProgramme¶
Bases:
PlayableItem,ImageMixinBase class for actual playable content.
- class sounds.models.LiveStation¶
Bases:
PlayableItem,IdentifiableMixin,ImageMixinBase class for actual playable content.
- class sounds.models.Stream¶
Bases:
TimedContent,SerializableMixin,ImageMixinRepresents a station stream.
- class sounds.models.Segment¶
Bases:
SerializableMixin,ImageMixinRepresents a segment within a stream.
- property spotify_url¶
- class sounds.models.Schedule¶
Bases:
ContainerRepresents a schedule for a given date.
- sub_items: List[ScheduleItem] | None¶
- get_current_item(timezone: zoneinfo.ZoneInfo | pytz.tzinfo.BaseTzInfo = pytz.timezone('UTC')) ScheduleItem | None¶
Get the currently airing schedule item.
- class sounds.models.RadioShow¶
Bases:
PlayableItem,TimedContent,ImageMixin,IdentifiableMixinRepresents a playable radio show.
- property item_id¶
- class sounds.models.RadioClip¶
Bases:
PlayableItem,TimedContent,ImageMixin,IdentifiableMixinRepresents a playable radio clip.
- class sounds.models.PodcastEpisode¶
Bases:
PlayableItem,ImageMixin,IdentifiableMixinRepresents a playable podcast episode.
- class sounds.models.Podcast¶
Bases:
ImageContainerRepresents a podcast container (holds episodes).
- class sounds.models.RadioSeries¶
Bases:
ImageContainerRepresents a radio series container (holds episodes).
- class sounds.models.Collection¶
Bases:
ImageContainerRepresents a collection container.
- class sounds.models.Category¶
Bases:
ImageContainerRepresents a content category.
- class sounds.models.CategoryItemContainer¶
Bases:
SerializableMixinRepresents a content category container.
- sub_items: List[SoundsTypes] | None = None¶
- class sounds.models.Playlist¶
Bases:
ImageContainerRepresents a playlist container.
- class sounds.models.CollectionItemContainer¶
Bases:
CategoryItemContainerRepresents a content collection container.
- class sounds.models.MenuItem¶
Bases:
ImageContainerRepresents a menu item container.
- get(key: str) CategoryItemContainer | Container | LiveStation | PodcastEpisode | RadioClip | RadioShow | Segment | ScheduleItem | StationSearchResult | None¶
Get a sub-menu item by ID.
- class sounds.models.Menu¶
Bases:
SerializableMixinRepresents a menu container with items.
- get(key: str) MenuItem | RecommendedMenuItem | None¶
Get a menu item by ID.
- class sounds.models.DisplayItem¶
Bases:
ContainerBase container for organizing content - not directly playable.
- item: PlayableItem | None = None¶
- class sounds.models.PromoItem¶
Bases:
ContainerBase container for organizing content - not directly playable.
- item: PlayableItem¶
- class sounds.models.SearchResults¶
Bases:
SerializableMixin- stations: List[LiveStation | StationSearchResult]¶
- episodes: List[PodcastEpisode | RadioClip | RadioShow]¶
- class sounds.models.Header¶
Bases:
BaseObjectBase class for all objects with common functionality.
- sounds.models.model_factory(object)¶