rinukkusu / spotify-dart

A dart library for interfacing with the Spotify API.
BSD 3-Clause "New" or "Revised" License
191 stars 91 forks source link

Missing 'album' Field in Recommendations.TrackSimple from recommendations.get API #176

Open tikbox opened 8 months ago

tikbox commented 8 months ago

Issue Summary: The recommendations.get API endpoint is returning incomplete data for the Recommendations.TrackSimple object. Specifically, the 'album' field is missing from the response, despite it being documented in the official API documentation. This issue is impacting the ability to retrieve complete information about recommended tracks.

Expected Behavior: The Recommendations.TrackSimple object should include the 'album' field in the response, as specified in the official API documentation.

Thank you for your attention to this matter.

rinukkusu commented 7 months ago

You are right - looking at the documentation there is indeed an album field in the example response. On the other hand the tracks array itself is made up of simplified versions of the Track object, as stated in that same documentation, which should not contain an album.

An array of track object (simplified) ordered according to the parameters supplied.

I think this is something we could tackle with the model classes rewrite in issue #172 - so we could have like a mixin or something for this specific case.

For now we could switch the tracks array to an array of the "full" Track class. Some fields might be empty of course. What do you think @hayribakici ?

hayribakici commented 7 months ago

Makes sense, @rinukkusu.