spotify api是否允许选项下拉与位置相关的数据?
https://developer.spotify.com/spotify-echo-nest-api/
^我打算申请一个带有echo巢的帐户 - 开始测试这些类型的回复 - 但是他们做了一些改变..
一个例子 -
http://developer.echonest.com/api/v4/artist/profile?api_key={echonest_api_key}&id=spotify:artist:5l8VQNuIg0turYE1VtM9zV&format=json&bucket=artist_location
// jsfiddle with a basic api http://jsfiddle.net/0u0v7e1b/971/
searchAlbums("bowie");
function fetchTracks (albumId, callback) {
$.ajax({
url: 'https://api.spotify.com/v1/albums/' + albumId,
success: function (response) {
callback(response);
}
});
};
function searchAlbums(query) {
$.ajax({
url: 'https://api.spotify.com/v1/search',
data: {
q: query,
type: 'album'
},
success: function (data) {
console.log(data);
$.each(data.albums.items, function(k, v) {
console.log("results-->", v);
$("#album").append('<li><div>Name:: '+v.name+'</div></li>');
});
}
});
};
- 在尝试获取适用于不同查询的身份验证时遇到问题。
var url = "https://foursquare.com/oauth2/access_token";
url += "?client_id=" + this.clientId;
url += "&client_secret=" + this.clientSecret;
url += "&grant_type=authorization_code";
url += "&redirect_uri=" + this.redirectUrl;
url += "&code=" + this.code;
this.getJson(url, function(data) {
//console.log("authorize",data);
})