pub struct CreateStation {
pub track_token: String,
pub music_type: MusicType,
pub music_token: String,
}
Expand description
Stations can either be created with a musicToken obtained by Search or trackToken from playlists (Retrieve playlist). The latter needs a musicType to specify whether the track itself or its artist should be used as seed.
| Name | Type | Description | | trackToken | string | See Retrieve playlist | | musicType | string | “song” or “artist” (“song” for genre stations) | | musicToken | string | See Search |
Fields§
§track_token: String
The unique id (token) for the track around which the station should be created.
music_type: MusicType
Whether the artist or the song referred to by the trackToken should be used to create the station.
music_token: String
The unique id (token) for the artist/composer/song/genre to be added to the station. Artist tokens start with ‘R’, composers with ‘C’, songs with ‘S’, and genres with ‘G’.
Implementations§
Source§impl CreateStation
impl CreateStation
Sourcepub fn new_from_track(track_token: &str, music_type: MusicType) -> Self
pub fn new_from_track(track_token: &str, music_type: MusicType) -> Self
Create a new station from a track, usually from a playlist.
Sourcepub fn new_from_music_token(music_token: &str) -> Self
pub fn new_from_music_token(music_token: &str) -> Self
Create a new station from a musicToken, usually returned by a search.
Sourcepub fn new_from_track_song(track_token: &str) -> Self
pub fn new_from_track_song(track_token: &str) -> Self
Create a new CreateStation for a song with some values.
Sourcepub fn new_from_track_artist(track_token: &str) -> Self
pub fn new_from_track_artist(track_token: &str) -> Self
Create a new CreateStation for an artist with some values.
Trait Implementations§
Source§impl Clone for CreateStation
impl Clone for CreateStation
Source§fn clone(&self) -> CreateStation
fn clone(&self) -> CreateStation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more