Quantcast
Channel: The Echo Nest Developer Forum
Viewing all articles
Browse latest Browse all 1582

Can't get multiple Buckets to work with $.getJSON

$
0
0

Hi, I am running into some trouble getting the buckets to work. Every time I try to have multiple buckets and pass them in as an array like examples I've seen, I get an ''Access-Control-Allow-Origin' header is present on the requested resource.' Error.

I looked at the request URL and it seems that if I try to use the array it encodes the brackets, and I cannot get any request with that encoding to go through. (Ex: http://developer.echonest.com/api/v4/artist/profile?api_key=hidden&bucket=news%26bucket%3Dartist_location&format=json&id=ARE602H1187FB3B8F8

Here's a basic example of what I'm trying to do:

var url = 'http://developer.echonest.com/api/v4/artist/profile'
        var args = {
            apikey: apiKey,
            //bucket: 'news',  --This works
            bucket: ['news', 'blogs'], --This does not
            format: 'json',
            id: artistsEchoNestId  
        };

$.getJSON(url, args, function (data) {
            console.log(data);
});

Any suggestions would be appreciated, thanks!


Viewing all articles
Browse latest Browse all 1582

Trending Articles