Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spotify API searchTracks按语言筛选_Spotify_Spotify App - Fatal编程技术网

Spotify API searchTracks按语言筛选

Spotify API searchTracks按语言筛选,spotify,spotify-app,Spotify,Spotify App,我正在使用JMPerez的()SpotifyWebAPI for javascript,我不知道如何根据流行程度过滤歌曲,可以吗 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 ab

我正在使用JMPerez的()SpotifyWebAPI for javascript,我不知道如何根据流行程度过滤歌曲,可以吗

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);
    });
}