Analysing spotify genres in a playlist
Things you need to get started:
* Register a new application at Spotify's dashboard
* Get the client_id
and client_secret
* Get the playlist's id
. You can find it it its uri: spotify:playlist:37i9dQZEVXbMDoHDwVN2tF
````rust use spotifygenres::{authspotify, getgenresfor_playlist};
fn main() {
let top50 = vec![
"37i9dQZEVXbMDoHDwVN2tF", // GLOBAL
"37i9dQZEVXbJiZcmkrIHGU", // GERMANY
"6VZ7JY80Iy1wy7GF076AMo", // NORWAY
];
let spotify = authspotify("id", "secret");
for playlist in top50 {
if let Ok(res) = getgenresforplaylist(&spotify, playlist) {
let str: Vec