pub struct SearchResponse {
pub songs: Vec<SongMatch>,
pub artists: Vec<ArtistMatch>,
pub genre_stations: Vec<GenreMatch>,
pub optional: HashMap<String, Value>,
}
Expand description
Matching songs, artists, and genre stations are returned in three separate lists.
| Name | Type | Description | | songs.musicToken | string | Token starts with ‘S’ followed by one or more digits (e.g. ‘S1234567’). | | artists.musicToken | string | Results can be either for artists (token starts with ‘R’) or composers (token starts with ‘C’). | | genreStations.musicToken | string | Token starts with ‘G’ followed by one or more digits (e.g. ‘G123’). |
{
"stat": "ok",
"result": {
"nearMatchesAvailable": true,
"explanation": "",
"songs": [{
"artistName": "Jason DeRulo",
"musicToken": "S1508963",
"songName": "Encore",
"score": 100
}],
"artists": [{
"artistName": "Encore",
"musicToken": "R175304",
"likelyMatch": false,
"score": 100
}],
"genreStations": [{
"musicToken": "G123",
"score": 100,
"stationName": "Today's Encore"
}]
}
}
Fields§
§songs: Vec<SongMatch>
Songs matching the search.
artists: Vec<ArtistMatch>
Artists matching the search.
genre_stations: Vec<GenreMatch>
Genre stations matching the search.
optional: HashMap<String, Value>
Additional optional fields that may appear in the response.
Trait Implementations§
Source§impl Clone for SearchResponse
impl Clone for SearchResponse
Source§fn clone(&self) -> SearchResponse
fn clone(&self) -> SearchResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SearchResponse
impl Debug for SearchResponse
Source§impl<'de> Deserialize<'de> for SearchResponse
impl<'de> Deserialize<'de> for SearchResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SearchResponse
impl RefUnwindSafe for SearchResponse
impl Send for SearchResponse
impl Sync for SearchResponse
impl Unpin for SearchResponse
impl UnwindSafe for SearchResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more