1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
//! Live radio stream handling for Deezer's gateway API.
//!
//! Provides livestream-specific wrappers and types for:
//! * Stream URLs in multiple formats (AAC/MP3)
//! * Multiple bitrate options (32k, 64k, 96k, 192k)
//! * Station metadata (title, description, image)
//! * Country availability and status
//!
//! Livestreams have unique characteristics:
//! * Continuous streaming without duration
//! * Multiple quality/codec combinations
//! * Country-specific availability
//! * Station metadata instead of track info
//!
//! # Wire Format
//!
//! Response format:
//! ```json
//! {
//! "LIVESTREAM_ID": "12345",
//! "LIVESTREAM_TITLE": "Lorem Ipsum",
//! "LIVESTREAM_DESCRIPTION": "",
//! "LIVESTREAM_IMAGE_MD5": "7e3ccxxxxxxxxxxxxxxxxxxxxxxxxx03",
//! "LIVESTREAM_IS_FINGERPRINTED": "0",
//! "LIVESTREAM_URLS": {
//! "data": {
//! "96": {
//! "mp3": "https://example.com/stream/96.mp3"
//! },
//! "192": {
//! "mp3": "https://example.com/stream/192.mp3"
//! },
//! "64": {
//! "aac": "https://example.com/stream/64.aac"
//! },
//! "32": {
//! "aac": "https://example.com/stream/32.aac"
//! }
//! },
//! "count": 4,
//! "total": 4,
//! "version": 1735116906,
//! "filtered_count": 0
//! },
//! "LIVESTREAM_COUNTRY": "nl",
//! "AVAILABLE": true,
//! "__TYPE__": "livestream"
//! }
//! ```
use Deref;
use ;
use ;
use ;
use crate::;
/// Gateway method name for retrieving radio streams.
///
/// Returns stream information including:
/// * Station metadata
/// * Multiple quality streams
/// * Codec options
/// * Availability status
/// Wrapper for livestream data.
///
/// Contains the same track information as [`ListData`] but specifically
/// for podcast episodes. The wrapper allows specialized handling while
/// reusing the underlying data structure.
;
/// Provides access to the underlying livestream data.
///
/// Allows transparent access to the livestream fields while maintaining
/// type safety for livestream-specific operations.
/// Request parameters for livestream data.
///
/// Used to request stream information with codec preferences.
///
/// # Example
///
/// ```rust
/// use deezer::gateway::{Request};
///
/// let request = Request {
/// livestream_id: 123456.into(),
/// supported_codecs: vec![Codec::AAC, Codec::MP3],
/// };
/// ```