I use the client.GetTrack to get a Track struct, but it has been erroring the past 1-2 days.
The Spotify APIs has recently changed to use float numbers instead of int for JSON objects.
Go error value:
json: cannot unmarshal number 2.0 into Go struct field FullTrack.track_number of type int
I am not that experienced with this codebase but that seemed to make it work well enough for my use case.
This commit does not cover all the possible JSON Number fields.
Please let me know if there are any more details you need. 🙂
I use the
client.GetTrack
to get a Track struct, but it has been erroring the past 1-2 days. The Spotify APIs has recently changed to usefloat
numbers instead ofint
for JSON objects.Go error value:
Temporary workaround personal solution: https://github.com/SLAzurin/spotify-go/commit/a386b802b7f24be842aaf1460109874de6aedd0f
I am not that experienced with this codebase but that seemed to make it work well enough for my use case. This commit does not cover all the possible JSON Number fields.
Please let me know if there are any more details you need. 🙂