rinukkusu / spotify-dart

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

[Fix] Remove default empty market when listing episodes #103

Closed yoannmtr closed 3 years ago

yoannmtr commented 3 years ago

The default empty value prevents _buildQuery (https://github.com/rinukkusu/spotify-dart/blob/master/lib/src/endpoints/shows.dart#L47) to properly filter the parameter (as _buildQuery only filter null values, not empty one).

I then get the following error when I try to get the episodes as an empty market parameter is sent to Spotify (instead of no market parameter)

Exception has occurred.
SpotifyException (Error Code: 400
Invalid market code)