这是使用免费api的代码。基本上,我想使用高级帐户将我的应用程序与deezer连接起来,但是不知道如何,目前我正在使用它
const GenresName = ['Billie Eilish', 'Ariana Grande', 'Shawn mendes', 'Taylor Swift', 'Selena Gomez', 'Khalid', 'Halsey', 'Lady gaga', 'Justin bieber', 'Dua Lipa'];
const dbData = [];
GenresName.forEach(element => {
dbData.push(
new Promise((resolve, reject) => {
axios({
"method": "GET",
"url": "https://deezerdevs-deezer.p.rapidapi.com/search",
"headers": {
"content-type": "application/octet-stream",
"x-rapidapi-host": "deezerdevs-deezer.p.rapidapi.com",
"x-rapidapi-key": "9fa178a405mshd97a2ec3e82759dp15cb00jsn3a410faa1438"
}, "params": {
"q": element
}
})
.then((response) => {
if (response.data) {
resolve(response.data.data);
}
})
.catch((error) => {
reject(error);
})
})
);
})