jzheng2017 / spotify-web-api-wrapper

Spotify API wrapper for Java
MIT License
50 stars 32 forks source link

Get Available Markets (Get the list of markets where Spotify is available.) #97

Closed eleonora2687 closed 2 months ago

eleonora2687 commented 3 months ago

Hi, Not quiete sure what is going on here.. I'm relatively new to open source and i' ve tried to make the project print All the markets where Spotify is available(i knew this could be done much much much easier with few just a few lines of code in a Java class by importing java.net.HttpURLConnection, import java.net.URL etc, but i tried to adapti it to the project and while everything seeems OK, I can't print the markets (check the Main class) Can someone please explain to me why is the getAllMarkets() method returning null?

I' ve put A LOT of effort to contribute to it but something is not working :(

What i' ve done can be found here: https://github.com/eleonora2687/spotify-web-api-wrapper

Thanks in advance

jzheng2017 commented 2 months ago

Hi @eleonora2687,

Thanks for your effort on contributing to the project. I appreciate that.

From a quick look at your code I can see that MarketFull contains a property called availableMarkets while the /markets endpoint returns a response with a property called markets. So, that means that the names do not match and will not be deserialized correctly unless you override the default naming strategy.

I hope this helps.