Domanda

I've got a different result when requesting the Deezer search API for an album from my production server: for instance this search: http://api.deezer.com/search/album?q=Billy%20Ze%20kick%20et%20Les%20Gamins%20en%20Folie%20Billy%20Ze%20Kick%20et%20Les%20Gamins%20en%20Folie

-on my laptop in France, I've got 2 results and the album #215350 as first result -on an heroku europe instance I've got 2 results, and the album #41910 as first result (absolutely no result if the heroku instance is in the US...) -and on my production (digital ocean in Amsterdam) server I've got the album #41910 as one and only result.

I'm assuming there is a legal issue related on which country this album is available but is there any way to avoid this?

others similars APIs have a local attribute which allow me to see if the album is available in the country of my end user... this is a real issue my server is in Amsterdam... my users are everywhere...

Any idea or solution?

Thanks!

È stato utile?

Soluzione

Search results are localized based on the current user's country (IP based). You can override the country by passing a user token to the request to make sure you always get the same results.

About availability, it is track-based: if you want to know if the song is available in a country, you'll have to query each track from your album. For example, http://api.deezer.com/track/2150054 returns the list of available countries.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top