JMPerez / spotify-web-api-js

A client-side JS wrapper for the Spotify Web API

Home Page:https://jmperezperez.com/spotify-web-api-js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question about searchTracks() function

surpol opened this issue · comments

I dont understand how to have the searchTracks() function filter by languages. It currently returns some spanish songs but I only want english

gettingTracks(){
	if (prev !== null) {
		prev.abort();
	}
	prev = spotifyApi.searchTracks('year: 2009', {limit: 50, offset:100});
	prev.then((data) => {
		console.log(data);
		this.setState({
	         all_tracks: { 
	             tracks: data.tracks.items
	         }
	})
	prev = null;
	}, function(err) {
		console.error(err);
	});
}