mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-27 07:55:49 +03:00
[GH-ISSUE #212] Search Syntax Question #146
Labels
No labels
bug
docs
enhancement
enhancement
enhancement
feedback wanted
good first issue
help wanted
help wanted
help wanted
invalid
pull-request
question
question
upstream
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-web-api-php#146
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Dec 20, 2020).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/212
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=5It 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
@jwilsson commented on GitHub (Dec 21, 2020):
Hi!
The "year" filter is passed with the actual query string, for example:
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!
@ghost commented on GitHub (Dec 21, 2020):
Hi Jonathan - that's a big help, thank you very much for your helpful reply, it's much appreciated :-)