pub trait Id {
// Required methods
fn id(&self) -> &str;
fn _type(&self) -> Type;
// Provided methods
fn uri(&self) -> String { ... }
fn url(&self) -> String { ... }
}
Expand description
Returns the inner Spotify object ID, which is guaranteed to be valid for
its type.
The type of the ID, as a function.
Returns a Spotify object URI in a well-known format: spotify:type:id
.
Examples: spotify:album:6IcGNaXFRf5Y1jc7QsE9O2
,
spotify:track:4y4VO05kYgUTo2bzbox1an
.
Returns a full Spotify object URL that can be opened in a browser.
Examples: https://open.spotify.com/track/4y4VO05kYgUTo2bzbox1an
,
https://open.spotify.com/artist/2QI8e2Vwgg9KXOz2zjcrkI
.