Closed qnten closed 4 years ago
Might make sense to file an issue with Spotify to see if this is intentional and something we should support.
There is an issue that reports problems with the audio analysis endpoint in general: https://github.com/spotify/web-api/issues/1555. Other libaries are also reporting the same deserialization problems: https://github.com/ramsayleung/rspotify/pull/94. But no reponse from Spotify yet.
@qnten looks like the issue upstream has been resolved. Is this still a problem or are the timestamps numbers again?
The type of the Timestamp value in the audio-analysis endpoint reponse changed from int to string. Thereby the json parsing in the following line is failing with the error message
json: cannot unmarshal string into Go struct field AnalysisMeta.meta.timestamp of type int64
. https://github.com/zmb3/spotify/blob/5fe5f9535a2c486f0e57ddd88bb703e297329edb/audio_analysis.go#L34Response from
https://api.spotify.com/v1/audio-analysis/{id}
:Because this change is nowhere documented im unsure if this will be reverted. Should the library support both cases?