0

I'm building an spotify-echonest app using the web apis from both. I'm using spotify api to get as many songs as I can from user input, what I need now is to get information about these songs from echonest but as far as I can see you can only set one filter as foreing_id in the rest service.

http://developer.echonest.com/api/v4/artist/similar?api_key=YOUR_API_KEY&id=spotify:artist:4Z8W4fKeB5YxbusRsdQVPb&bucket=id:spotify

I'm using the Java API from Echonest, anyway any help is usefull.

4

1 回答 1

0

您应该从 Spotify 的 Web API 查询音频功能,因为 Spotify 不再支持 echonest。我想您已经知道如何从 API 获取轨道 ID,您需要做的就是使用轨道 ID 来查询音频功能。

例子:

第 1 步:获取曲目 ID

curl -X GET "https://api.spotify.com/v1/search?q=track%3Anumb+artist%3Alinkin+park&type=track" -H "Accept: application/json"

第 2 步:获取访问令牌

curl H "Authorization: Basic YOUR_CLIENT_CREDENTIALS" -d grant_type=client_credentials https://accounts.spotify.com/api/token

第 3 步:获取音频功能

curl -X GET "https://api.spotify.com/v1/audio-features/YOUR_TRACK_ID" -H "Authorization: Bearer {YOUR_ACcess-TOKEN}"
于 2016-10-03T06:03:31.980 回答