1
gettingTracks(){
    // store the current promise in case we need to abort it
    if (prev !== null) {
        prev.abort();
    }
    // store the current promise in case we need to abort it
    prev = spotifyApi.searchTracks('genre: hip-hop year:2009', {limit: 25, offset:50});
    prev.then((data) => {
        this.setState({
          all_tracks: { 
              tracks: data.tracks.items
            }
        })
        prev = null;
    }, function(err) {
        console.error(err);
    });
}

I'm using JMPerez's (https://github.com/JMPerez/spotify-web-api-js) spotify web api for javascript and I'm not understanding how to filter the songs by popularity, is it possible to?

Surya
  • 576
  • 1
  • 4
  • 16
  • Hi. Did you want to filter by language as the title says or by popularity? Anyway, none of them are available. The only thing related I see in the Spotify API documentation is using the tag:hipster when searching for albums, so that you get only albums with the lowest 10% popularity. – Enric A. Sep 19 '22 at 14:49

0 Answers0