Closed ghost closed 3 years ago
Hi! The "year" filter is passed with the actual query string, for example:
$str = $str . ' year:2016';
$search = $api->search($str,'album', $options);
The Spotify docs has more in-depth info, but don't worry about encoding spaces. The library will handle it for you.
Hope this helps!
Hi Jonathan - that's a big help, thank you very much for your helpful reply, it's much appreciated :-)
Hi - firstly, thank you for writing this excellent repository.
I am working on the search part of the API, and this is my sample code:
If I search for something, e.g. trees, and I check the 'href' attribute value that's returned by the API, it is this:
https://api.spotify.com/v1/search?query=trees&type=album&offset=0&limit=5
It seems that the Year part of the option array is ignored.
Am I doing something wrong? I searched the Closed Issues before raising this new issue.
I also tried setting the Year as a String as follows but get the same result:
$options = ['offset' => 0,'limit' => 5,'year' => '2016'];
Thanks