zmb3 / spotify

A Go wrapper for the Spotify Web API
Apache License 2.0
1.37k stars 287 forks source link

TrackAttributes as exported struct #90

Open bensinober opened 5 years ago

bensinober commented 5 years ago

Hi, thanks for a great library wrapper! I wonder about the TrackAttributes struct, wouldn't it be better/simpler to map a simple struct against the spotify API? at least export the fields so it can easily decode from json. Now it is quite awkward to construct. In my particular usecase I fetch some json trackattributes that I just want to send to the recommendation seed, and I dont see the point in looping and testing for every property. In the end its just json objects both ways.

zmb3 commented 5 years ago

Thanks for the issue! I'd be happy to review a PR with an alternative approach.