sounds.constants ================ .. py:module:: sounds.constants Attributes ---------- .. autoapisummary:: sounds.constants.COOKIE_ID sounds.constants.VERBOSE_LOG_LEVEL sounds.constants.FIXTURES_FOLDER Classes ------- .. autoapisummary:: sounds.constants.Fixtures sounds.constants.SignedInURLs sounds.constants.URLs sounds.constants.BaseSoundsTypes sounds.constants.PlayableSoundsTypes sounds.constants.ImageType sounds.constants.ItemURN sounds.constants.ItemType sounds.constants.ContainerType sounds.constants.NetworkType sounds.constants.IDType sounds.constants.PlayStatus Module Contents --------------- .. py:data:: COOKIE_ID :value: 'ckns_id' .. py:data:: VERBOSE_LOG_LEVEL :type: Final[int] :value: 5 .. py:data:: FIXTURES_FOLDER :value: 'tests/json/' .. py:class:: Fixtures(*args, **kwds) Bases: :py:obj:`enum.Enum` Create a collection of name/value pairs. Example enumeration: >>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3 Access them by: - attribute access: >>> Color.RED - value lookup: >>> Color(1) - name lookup: >>> Color['RED'] Enumerations can be iterated over, and know how many members they have: >>> len(Color) 3 >>> list(Color) [, , ] Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details. .. py:attribute:: EXPERIENCE_MENU :value: 'menu.json' .. py:attribute:: SCHEDULE_DATE_URL :value: 'schedule.json' .. py:attribute:: SCHEDULE_URL :value: 'schedule.json' .. py:class:: SignedInURLs(*args, **kwds) Bases: :py:obj:`enum.Enum` Create a collection of name/value pairs. Example enumeration: >>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3 Access them by: - attribute access: >>> Color.RED - value lookup: >>> Color(1) - name lookup: >>> Color['RED'] Enumerations can be iterated over, and know how many members they have: >>> len(Color) 3 >>> list(Color) [, , ] Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details. .. py:attribute:: RENEW_SESSION :value: 'https://session.bbc.co.uk/session?context=iplayerradio&userOrigin=sounds' .. py:attribute:: PLAYS :value: 'https://rms.api.bbc.co.uk/v2/my/programmes/plays' .. py:attribute:: RECOMMENDATIONS :value: 'https://rms.api.bbc.co.uk/v2/my/programmes/recommendations/playable' .. py:attribute:: MUSIC_RECOMMENDATIONS :value: 'https://rms.api.bbc.co.uk/v2/my/programmes/recommendations/music-mixes/playable' .. py:attribute:: LATEST :value: 'https://rms.api.bbc.co.uk/v2/my/programmes/follows/playable' .. py:attribute:: SUBSCRIBED :value: 'https://rms.api.bbc.co.uk/v2/my/programmes/follows' .. py:attribute:: BOOKMARKS :value: 'https://rms.api.bbc.co.uk/v2/my/programmes/favourites/playable' .. py:attribute:: CONTINUE :value: 'https://rms.api.bbc.co.uk/v2/my/programmes/plays/playable' .. py:attribute:: PID_PLAYABLE :value: 'https://rms.api.bbc.co.uk/v2/my/programmes/{pid}/playable' .. py:attribute:: CONTAINER_URL :value: 'https://rms.api.bbc.co.uk/v2/my/experience/inline/container/{urn}' .. py:class:: URLs(*args, **kwds) Bases: :py:obj:`enum.Enum` /v2/networks - Provides the list of all the v2 networks /v2/networks/playable - Provides the list of all the playable networks /v2/networks/{id}/playable - Provides the network playable item by network ID. 🎶 Green Day /radio/networks.json - All iPlayer Radio networks - contains business logic for masterbrand and service relationships /v2/services/{sid}/tracks/latest/playable - Retrieve list of tracks as playable items for a service 🎶 Deftones .. py:attribute:: LOGIN_START :value: 'https://session.bbc.co.uk/session?ptrt=https%3A%2F%2Fwww.bbc.co.uk%2Fsounds&context=iplayerradio... .. py:attribute:: LOGIN_START_I18N :value: 'https://account.bbc.com/auth?realm=%2F&clientId=Account&ptrt=https%3A%2F%2Fwww.bbc.com%2F&userOr... .. py:attribute:: LOGIN_BASE :value: 'https://account.bbc.com' .. py:attribute:: COOKIE_BASE :value: 'https://www.bbc.co.uk' .. py:attribute:: COOKIE_BASE_I18N :value: 'https://www.bbc.com' .. py:attribute:: JWT :value: 'https://rms.api.bbc.co.uk/v2/sign/token/{station_id}' .. py:attribute:: INTL_JWT :value: 'https://web-cdn.api.bbci.co.uk/xd/media-token?{id_type}={id}' .. py:attribute:: USER_INFO :value: 'https://www.bbc.co.uk/userinfo' .. py:attribute:: MEDIASET :value: 'https://open.live.bbc.co.uk/mediaselector/6/select/version/2.0/mediaset/pc/vpid/{station_id}/for... .. py:attribute:: EPISODE_MEDIASET :value: 'https://open.live.bbc.co.uk/mediaselector/6/select/version/2.0/mediaset/pc/vpid/{episode_id}' .. py:attribute:: NETWORKS_LIST :value: 'https://rms.api.bbc.co.uk/radio/networks.json' .. py:attribute:: STATIONS :value: 'https://rms.api.bbc.co.uk/v2/experience/inline/stations' .. py:attribute:: LIVE_STATION_DETAILS :value: 'https://rms.api.bbc.co.uk/v2/experience/inline/play/{station_id}' .. py:attribute:: STATION_DETAILS :value: 'https://rms.api.bbc.co.uk/v2/networks/{station_id}' .. py:attribute:: STATION_PLAYABLE_DETAILS :value: 'https://rms.api.bbc.co.uk/v2/networks/{station_id}/playable' .. py:attribute:: LIVE_STATION :value: 'https://www.bbc.co.uk/sounds/play/live:{station_id}' .. py:attribute:: NOW_PLAYING :value: 'https://rms.api.bbc.co.uk/v2/services/{station_id}/segments/latest?limit={limit}' .. py:attribute:: SCHEDULE :value: 'https://rms.api.bbc.co.uk/v2/experience/inline/schedules/{station_id}' .. py:attribute:: SCHEDULE_DATE :value: 'https://rms.api.bbc.co.uk/v2/experience/inline/schedules/{station_id}/{date}' .. py:attribute:: SEGMENTS :value: 'https://rms.api.bbc.co.uk/v2/versions/{vpid}/segments' .. py:attribute:: PLAYABLE_ITEMS_CONTAINER :value: 'https://rms.api.bbc.co.uk/v2/programmes/playable?container={pid}&sort=sequential' .. py:attribute:: CATEGORY_LATEST :value: 'https://rms.api.bbc.co.uk/v2/programmes/playable?category={category}&sort=-release_date&experien... .. py:attribute:: CATEGORY_POPULAR :value: 'https://rms.api.bbc.co.uk/v2/programmes/playable?category={category}&sort=popular&experience=domestic' .. py:attribute:: BROADCAST :value: 'https://rms.api.bbc.co.uk/v2/broadcasts/{pid}' .. py:attribute:: PID :value: 'https://rms.api.bbc.co.uk/v2/programmes/{pid}' .. py:attribute:: PID_PLAYABLE :value: 'https://rms.api.bbc.co.uk/v2/programmes/{pid}/playable' .. py:attribute:: CONTAINER_URL :value: 'https://rms.api.bbc.co.uk/v2/experience/inline/container/{urn}' .. py:attribute:: PLAYLIST :value: 'https://www.bbc.co.uk/programmes/{pid}/playlist.json' .. py:attribute:: COLLECTIONS_FULL :value: 'https://rms.api.bbc.co.uk/v2/collections/{pid}/members/container?experience=domestic&offset={off... .. py:attribute:: COLLECTIONS :value: 'https://rms.api.bbc.co.uk/v2/collections/{pid}/members/container?experience=domestic' .. py:attribute:: EXPERIENCE_MENU :value: 'https://rms.api.bbc.co.uk/v2/my/experience/inline/listen' .. py:attribute:: SEARCH_URL :value: 'https://rms.api.bbc.co.uk/v2/experience/inline/search?q={search}' .. py:attribute:: SHOW_SEARCH_URL :value: 'https://rms.api.bbc.co.uk/v2/programmes/search/container?q={search}' .. py:attribute:: EPISOSDE_SEARCH_URL :value: 'https://rms.api.bbc.co.uk/v2/programmes/search/playable?q={search}' .. py:attribute:: PODCASTS :value: 'https://rms.api.bbc.co.uk/v2/experience/inline/speech' .. py:attribute:: MUSIC :value: 'https://rms.api.bbc.co.uk/v2/experience/inline/music' .. py:attribute:: NEWS :value: 'https://rms.api.bbc.co.uk/v2/experience/inline/container/urn:bbc:radio:category:news' .. py:class:: BaseSoundsTypes(*args, **kwds) Bases: :py:obj:`enum.Enum` Types as defined in the JSON schema .. py:attribute:: PROGRAMMES :value: 'Programmes' .. py:attribute:: EXPERIENCE_RESPONSE :value: 'ExperienceResponse' .. py:attribute:: CONTAINER :value: 'PlayableItems' .. py:attribute:: ERROR :value: 'ErrorResponse' .. py:attribute:: SEGMENTS :value: 'SegmentItemsResponse' .. py:attribute:: CONTAINER_ITEMS :value: 'ContainerItems' .. py:attribute:: PLAYABLE_ITEMS :value: 'PlayableItems' .. py:class:: PlayableSoundsTypes(*args, **kwds) Bases: :py:obj:`enum.Enum` Types as defined in the JSON schema .. py:attribute:: EPISODE :value: 'Episode' .. py:attribute:: PROGRAMMES :value: 'Programmes' .. py:attribute:: EXPERIENCE_RESPONSE :value: 'ExperienceResponse' .. py:attribute:: PLAYABLE_ITEM :value: 'PlayableItem' .. py:attribute:: BROADCASTS :value: 'BroadcastsResponse' .. py:class:: ImageType(*args, **kwds) Bases: :py:obj:`enum.Enum` An enum for valid image types for recipes .. py:attribute:: COLOUR :value: 'colour' .. py:attribute:: COLOUR_DEFAULT :value: 'colour_default' .. py:attribute:: BACKGROUND :value: 'background' .. py:attribute:: BLOCKS_COLOUR :value: 'blocks_colour' .. py:attribute:: BLOCKS_COLOUR_BLACK :value: 'blocks_colour_black' .. py:attribute:: BLOCKS_COLOUR_WHITE :value: 'blocks_colour_white' .. py:class:: ItemURN(*args, **kwds) Bases: :py:obj:`enum.Enum` Create a collection of name/value pairs. Example enumeration: >>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3 Access them by: - attribute access: >>> Color.RED - value lookup: >>> Color(1) - name lookup: >>> Color['RED'] Enumerations can be iterated over, and know how many members they have: >>> len(Color) 3 >>> list(Color) [, , ] Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details. .. py:attribute:: EPISODE :value: 'urn:bbc:radio:episode' .. py:attribute:: CLIP :value: 'urn:bbc:radio:clip' .. py:attribute:: COLLECTION :value: 'urn:bbc:radio:collection' .. py:attribute:: CATEGORY :value: 'urn:bbc:radio:category' .. py:attribute:: SERIES :value: 'urn:bbc:radio:series' .. py:attribute:: RADIO_SHOW_OR_PODCAST :value: 'urn:bbc:radio:brand' .. py:attribute:: STATION :value: 'urn:bbc:radio:network' .. py:attribute:: PROMO_ITEM :value: 'urn:bbc:radio:content:single_item_promo' .. py:attribute:: SEGMENT_ITEM :value: 'urn:bbc:radio:segment:music' .. py:class:: ItemType(*args, **kwds) Bases: :py:obj:`enum.Enum` Create a collection of name/value pairs. Example enumeration: >>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3 Access them by: - attribute access: >>> Color.RED - value lookup: >>> Color(1) - name lookup: >>> Color['RED'] Enumerations can be iterated over, and know how many members they have: >>> len(Color) 3 >>> list(Color) [, , ] Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details. .. py:attribute:: PLAYABLE_ITEM :value: 'playable_item' .. py:attribute:: DISPLAY_ITEM :value: 'display_item' .. py:attribute:: BROADCAST_SUMMARY :value: 'broadcast_summary' .. py:attribute:: INLINE_DISPLAY_MODULE :value: 'inline_display_module' .. py:attribute:: INLINE_HEADER_MODULE :value: 'inline_header_module' .. py:attribute:: EPISODE :value: 'episode' .. py:attribute:: BROADCAST :value: 'broadcast' .. py:attribute:: RADIO_SEARCH :value: 'live_search_result_item' .. py:attribute:: SEGMENT_ITEM :value: 'segment_item' .. py:class:: ContainerType(*args, **kwds) Bases: :py:obj:`enum.Enum` Create a collection of name/value pairs. Example enumeration: >>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3 Access them by: - attribute access: >>> Color.RED - value lookup: >>> Color(1) - name lookup: >>> Color['RED'] Enumerations can be iterated over, and know how many members they have: >>> len(Color) 3 >>> list(Color) [, , ] Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details. .. py:attribute:: BRAND :value: 'brand' .. py:attribute:: SERIES :value: 'series' .. py:attribute:: ITEM :value: 'container_item' .. py:class:: NetworkType(*args, **kwds) Bases: :py:obj:`enum.Enum` Create a collection of name/value pairs. Example enumeration: >>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3 Access them by: - attribute access: >>> Color.RED - value lookup: >>> Color(1) - name lookup: >>> Color['RED'] Enumerations can be iterated over, and know how many members they have: >>> len(Color) 3 >>> list(Color) [, , ] Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details. .. py:attribute:: MASTER :value: 'master_brand' .. py:class:: IDType(*args, **kwds) Bases: :py:obj:`enum.Enum` Create a collection of name/value pairs. Example enumeration: >>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3 Access them by: - attribute access: >>> Color.RED - value lookup: >>> Color(1) - name lookup: >>> Color['RED'] Enumerations can be iterated over, and know how many members they have: >>> len(Color) 3 >>> list(Color) [, , ] Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details. .. py:attribute:: SCHEDULE_ITEMS :value: 'schedule_items' .. py:attribute:: SINGLE_ITEM_PROMO :value: 'single_item_promo' .. py:attribute:: STATION_SEARCH_CONTAINER :value: 'live_search' .. py:attribute:: SHOW_SEARCH_CONTAINER :value: 'container_search' .. py:attribute:: EPISODE_SEARCH_CONTAINER :value: 'playable_search' .. py:class:: PlayStatus(*args, **kwds) Bases: :py:obj:`enum.Enum` Create a collection of name/value pairs. Example enumeration: >>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3 Access them by: - attribute access: >>> Color.RED - value lookup: >>> Color(1) - name lookup: >>> Color['RED'] Enumerations can be iterated over, and know how many members they have: >>> len(Color) 3 >>> list(Color) [, , ] Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details. .. py:attribute:: STARTED :value: 'started' .. py:attribute:: PAUSED :value: 'paused' .. py:attribute:: ENDED :value: 'ended' .. py:attribute:: HEARTBEAT :value: 'heartbeat'