Does the spotify api allow the option to pull down data related to location?
- Most popular genre of music in a location
- Most popular artist in your area
- Most popular band in your area
https://developer.spotify.com/spotify-echo-nest-api/
^ I was going to apply for an account with the echo nest - to start testing these types of responses - but they have made some changes..
an example --
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 in place 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>');
});
}
});
};
--having issues trying to get authetnication to work for different queries.
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);
})