When looking at the network tab, I realized that I sent the query ''
Unfortunately, it didn't work as expected. How do I adjust the query to have the order like this:
Should the 'q' parameter come after the search?
getArtists(query) {
const params = {
type: 'track,artist',
market: 'US',
limit: 14,
offset: 5
};
if (typeof query === 'string') {
params.q = query;
}
console.log(params)
return this.$http.get("https://api.spotify.com/v1/search", {
params }).then(function mySuccess(response) {
console.log(response.data);
}, function myError(response) {
console.log(response);
});
};
getArtists('Abba');