Metadata

Contents

Metadata#

Models#

class nrk_psapi.models.metadata.Interaction[source]#

Bases: BaseDataClassORJSONMixin

Interaction(type: ‘InteractionPoint’, start_time: ‘float’, end_time: ‘float’)

type: InteractionPoint#
start_time: float#
end_time: float#
class nrk_psapi.models.metadata.LegalAgeRating[source]#

Bases: BaseDataClassORJSONMixin

Represents the rating information for legal age.

code: str#
display_age: str#
display_value: str#
class nrk_psapi.models.metadata.LegalAgeBody[source]#

Bases: BaseDataClassORJSONMixin

Represents the body of legal age information.

status: str#
rating: LegalAgeRating | None = None#
class nrk_psapi.models.metadata.LegalAge[source]#

Bases: BaseDataClassORJSONMixin

Represents the legal age information.

legal_reference: str#
body: LegalAgeBody#
class nrk_psapi.models.metadata.OnDemand[source]#

Bases: BaseDataClassORJSONMixin

Represents the on demand information.

_from: datetime#
to: datetime#
has_rights_now: bool#
class nrk_psapi.models.metadata.Poster[source]#

Bases: BaseDataClassORJSONMixin

Represents a poster with multiple image sizes.

images: list[Image]#
class nrk_psapi.models.metadata.SkipDialogInfo[source]#

Bases: BaseDataClassORJSONMixin

SkipDialogInfo(start_intro_in_seconds: ‘int’, end_intro_in_seconds: ‘int’, start_credits_in_seconds: ‘int’, start_intro: ‘timedelta’, end_intro: ‘timedelta’, start_credits: ‘timedelta’)

start_intro_in_seconds: int#
end_intro_in_seconds: int#
start_credits_in_seconds: int#
start_intro: timedelta#
end_intro: timedelta#
start_credits: timedelta#
class nrk_psapi.models.metadata.Preplay[source]#

Bases: BaseDataClassORJSONMixin

Represents the preplay information.

titles: Titles#
description: str#
poster: Poster#
index_points: list[IndexPoint]#
square_poster: Poster | None = None#
class nrk_psapi.models.metadata.Manifest[source]#

Bases: BaseDataClassORJSONMixin

Represents a manifest in the _embedded section.

availability_label: str#
id: str#
class nrk_psapi.models.metadata.PodcastMetadataEmbedded[source]#

Bases: BaseDataClassORJSONMixin

Represents the podcast information in the _embedded section.

titles: Titles#
image_url: str#
rss_feed: str#
episode_count: int#
class nrk_psapi.models.metadata.PodcastEpisodeMetadata[source]#

Bases: BaseDataClassORJSONMixin

Represents the podcast episode information in the _embedded section.

clip_id: str | None = None#
class nrk_psapi.models.metadata.PodcastMetadata[source]#

Bases: BaseDataClassORJSONMixin

Represents the main structure of the API response for podcast metadata.

id: str#
playability: Playability#
streaming_mode: str#
legal_age: LegalAge#
availability: AvailabilityDetailed#
preplay: Preplay#
source_medium: PlayableSourceMedium#
duration: timedelta | None = None#
display_aspect_ratio: str | None = None#
playable: Playable | None = None#
non_playable: NonPlayable | None = None#
interaction_points: list[InteractionPoint] | None#
skip_dialog_info: SkipDialogInfo | None = None#
interaction: list[Interaction] | None#
manifests: list[Manifest]#
podcast: PodcastMetadataEmbedded | None = None#
podcast_episode: PodcastEpisodeMetadata | None = None#

Enums#

enum nrk_psapi.models.metadata.InteractionPoint(value)[source]#

Bases: StrEnum

Member Type:

str

Valid values are as follows:

SEEK_TO_POINTS = <InteractionPoint.SEEK_TO_POINTS: 'seekToPoints'>#
NEXT_UP_POINT = <InteractionPoint.NEXT_UP_POINT: 'nextUpPoint'>#
RECOMMEND_NEXT_POINT = <InteractionPoint.RECOMMEND_NEXT_POINT: 'recommendNextPoint'>#