Hello,
All it does is to provide a simple query interface for the api. It gets a bunch of sound ids in response, then parses the hq mp3 preview urls in the detailed info returned by the api from each sound id, and downloads the hq preview files automatically (either via ajax in the browser or using http.get in node).
The idea is that it can either work as a simple browser library allowing to easily get some mp3 files to play from a few search terms, or on a local network where node will take care of downloading the files from the search terms and serving them to local clients so that they can jam together.
Yesterday I came back working on the project for which I wrote it, and noticed it didn't work anymore ...
I was about to come by here and complain "why my awesome library doesn't work anymore ?", but I noticed that I was simply redirected to secure versions of the urls.
So I just changed the urls I got from the detailed info returned by the API so that they are prefixed with "https", and switched from http.get to https.get in nodejs.
Now it's working again.
I have a couple of questions :
- is this approach sustainable ? or is it likely to break in a near future ?
- if it is sustainable (which means I'm not doing something "bad"), shouldn't the api return the https urls directly in the detailed info of the sounds ?
For the time being, I'll update my lib with these fixes and move forward with my project.
Thanks for any feedback,
Joseph