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

Track/Profile call code example

$
0
0

(I posted this in General Discussion a few minutes ago but a co-worker suggested I put it in this forum as well. Very sorry for the redundancy. Just let me know which one is appropriate and I will delete the other.)

I'm writing a node app and I'm using the Request module to send my Track/Upload post and my Track/Profile get. I receive (what I'm assuming is) the appropriate response from the upload.. i.e. the status says 'pending'. I use the Track ID in my profile function call, but that returns status 'pending' as well. I'm attempting to pull the Tempo and Time Signature values from the analysis response but I can't seem to get the upload or profile calls to return status 'complete'. What I'm wondering is how to set up the code to hit the API with the profile call when the upload is complete..? Or I've read in other posts how some have the profile call in a loop. I've tried setTimeout(), for loops, while loops, nothing is returning a 'complete' status or the analysis. Could someone so graciously post an example of how they are setting up their profile call so that it delivers the status 'complete' and the analysis values? I'm a bit stuck.

Thanks


Viewing all articles
Browse latest Browse all 1582

Trending Articles