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

Get custom URL from playlist call

$
0
0

I've created a taste profile with some URLs to the tracks (both locally and on Spotify). When I request a playlist using the taste profile as a source, is it possible to get the URLs? Otherwise I'll need to make separate calls for every song in the playlist or store the data locally.

Thanks!


JSONP with error (non-200) intercepted by browsers

$
0
0

echoing what RGLN is saying, it would be great to have a mapping of http response codes (similar to soundcloud), and/or add CORS supports to the API for making cross domain requests

given that this origin post was 3years ago, is this realistic?

JSONP with error (non-200) intercepted by browsers

$
0
0

CORS support has been part of the API for years now. This link:

http://developer.echonest.com/docs/v4/#http-response-codes

documents our use of HTTP response codes.

P

OTA android

$
0
0

Hey,

Where did you get this demo from?

JSONP with error (non-200) intercepted by browsers

$
0
0

Thanks Paul

maybe i've misunderstood, i thought adding CORS (Cross-origin resource sharing) would allow cross domain requests with response headers such as Access-Control-Allow-Origin: *

the issue seen, is when requests that generate an error response (400) this header (Access-Control-Allow-Origin: *) is not sent in the response

see the example below, where i've purposely supplied an incorrect api_key

Remote Address:172.30.40.11:8080
Request URL:http://developer.echonest.com/api/v4/artist/profile?api_key=demo&name=weezer
Request Method:GET
Status Code:400 Bad Request

HTTP/1.1 400 Bad Request
Via: 1.1 ID-0000627501223746 uproxy-3, 1.1 UK-AFF-WSISA01
Connection: Keep-Alive
Proxy-Connection: Keep-Alive
Content-Length: 92
Date: Wed, 03 Sep 2014 07:41:32 GMT
Content-Type: application/json; charset=utf-8
Server: TornadoServer/3.1
X-Request-Id: LHxeYkr/RIKX3aQvNJciIw
X-Api-Key: Unknown

Song/identify will be offline for extended maintenance

$
0
0

Echoprint song/identify is also my favorit one.

JSONP with error (non-200) intercepted by browsers

$
0
0

Are you using jQuery? If so, requests that fail because of the CORS header issue will resolve the "fail" path of the promise. For example,

$.getJSON('http://developer.echonest.com/api/v4/artist/profile', 
                 {api_key:"demo", name:"weezer"})
    .then(function(){console.log("success!", arguments);}, 
             function(){console.log("failure :(", arguments);});

Will print out

failure :( [Object, "error", ""]

In the console.

This is the appropriate way to handle potential errors coming back from our API. Success will always have a CORs header, but failures can potentially come from several different places, and in several different guises. Handling the case where your Deferred is rejected is the best way to catch everything.

JSONP with error (non-200) intercepted by browsers

$
0
0

Hey Ned, thanks for chipping in

So when making requests from the client, the only way to handle errors is in a generic 'catch all' way

Just so i can understand...

Why are the CORs headers missing from non 200 responses?

Is it by design or a limitation?

Seems a little incomplete that the response cannot be communicated to the original requester

{"response": {"status": {"version": "4.2", "code": 1, "message": "1|Invalid key: Unknown"}}}

Artist search "results" and "start" parameters not working

$
0
0

Artist search pagination does not seem to work properly.

For instance, a dummy search for "aa" using results=10 and start=0 gives me 10 results

http://developer.echonest.com/api/v4/artist/search?api_key=xxx&format=json&name=aa&results=10&start=0

The same search for "aa" using results=5 and start=5 gives me 0 results

http://developer.echonest.com/api/v4/artist/search?api_key=xxx&format=json&name=aa&results=5&start=5

Even weirder, search for "aa" using results=10 and start=3 gives me 7 results

http://developer.echonest.com/api/v4/artist/search?api_key=xxx&format=json&name=aa&results=10&start=3

I imagine there is a bug that somehow substracts the number of results to return from the "start" to the "results" parameters?

This makes it impossible to paginate on the artist search.

Thank you

Artist search "results" and "start" parameters not working

$
0
0

Hi noahsimon. Thanks for pointing this out. We're looking into it.

-Eli

API Key not working

$
0
0

Hi, I just registered with echonest and got my API key. I can use it through the web-service but cannot use it in java program. Here is my code : ArtistAPI artistAPI = new ArtistAPI(API_KEY); I get an error : No API Key is defined. Get a key from http://developer.echonest.com. Thanks Mita

API Key Problems

$
0
0

Hi,

I've been having trouble activating my API key, is it possible to have the activation email resent or have it done manually?

TasteProfile/Catalog not updating?

$
0
0

I'm going to go ahead and assume that the following error is stupidity on my part, so bare with me. I've tried creating a tasteprofile and a catalog-radio dynamic playlist based on it. When I do playlist/dynamic/feedback (or skip/next), the changes aren't being logged onto my catalog. I'll include some details about the requests I'm making below:

first I'm GETting tasteprofile/create with {
    name: Date.now(),
    type: 'artist'
}.


Then, I'm adding a "seed" by favoriting a few artists. This works. Here's an example of what I'm POSTing to tasteprofile/update:

[
    {
        action: 'update',
        item: {
            artist_id: 'AR12345...',
            favorite: true
        }
    },
    {
        action: 'update',
        item: {
            artist_id: 'AR67890...',
            favorite: true
        }
    }
]

The following step is where the code isn't working. The dynamic playlists created with requests like the following don't seem to log their actions to the catalog specified (although the songs played are similar to the artists specified in the previous step).

{
    session_catalog: 'CAXXXXXXXXXXXXXXYZ',
    seed_catalog: 'CAXXXXXXXXXXXXXXYZ',
    type: 'catalog-radio'
}

What should I do?

API Key Problems

$
0
0

Never mind, it seems to be working now :)

TasteProfile/Catalog not updating?

$
0
0

I guess the pre tags and no-break spaces don't work? Sorry. They looked liked they worked in the preview.

Here are the requests I made in the "Proper" format:

GET {    name: Date.now(),    type: 'artist' }


POST [    {       action: 'update',       item: {          artist_id: 'AR12345...',          favorite: true       }    },    {       action: 'update',       item: {          artist_id: 'AR67890...',          favorite: true       }    } ]


GET {    session_catalog: 'CAXXXXXXXXXXXXXXYZ',    seed_catalog: 'CAXXXXXXXXXXXXXXYZ',    type: 'catalog-radio' }


Also, I may add, could you not show html-styled markdown on the preview and perhaps show no-break spaces? In order to get everything to look JSONish, I had to jump through some hoops to make tabs. I had to use a regular space surrounded by two EM spaces, which is the size of a tab.


Artist search "results" and "start" parameters not working

$
0
0

Hello all,

Just wondering if you had any updates on this issue. Are you aware of some workaround I could use in the meantime for the search pagination?

API Key not working

$
0
0

Hi - Is anyone looking into this? My API key with java is not working.

Thanks, Mita

API Key not working

$
0
0

Hi Mita,

In order to get help, you'll need to be a little more specific about what problem you're having. When you say you "can use it through the web-service", do you mean that you can manually type a URL into a web browser using your API key, and it works? (Or equivalently, you can be logged into this site, click a link in the API documentation, and it works.)

If that's so, then it sounds like you're writing something wrong in your Java code before it calls our API.

-Eli

API Key not working

$
0
0

Hi - I am using the java code code from your documentation: http://code.google.com/p/echo-nest-java-api/ Under Artist Similarity example. When I use the key that was given to me in the same example but running it from my eclipse, I get: Exception thrown in getting artists com.echonest.api.v3.EchoNestException: java.io.FileNotFoundException: http://developer.echonest.com/api/search_artists?query=weezer&sounds_like=N&version=3&api_key= at com.echonest.api.v3.artist.ArtistAPI.searchArtist(ArtistAPI.java:107) at Manalysis.analSong(Manalysis.java:14) at Manalysis.main(Manalysis.java:30) Caused by: java.io.FileNotFoundException: http://developer.echonest.com/api/search_artists?query=weezer&sounds_like=N&version=3&api_key= at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1434) at com.echonest.api.util.Commander.sendCommandRaw(Commander.java:267) at com.echonest.api.util.Commander.sendCommand(Commander.java:179) at com.echonest.api.v3.EchoNestCommander.sendCommand(EchoNestCommander.java:269) at com.echonest.api.v3.EchoNestCommander.sendCommand(EchoNestCommander.java:256) at com.echonest.api.v3.artist.ArtistAPI.searchArtist(ArtistAPI.java:92) ... 2 more

API Key not working

Viewing all 1582 articles
Browse latest View live