php-allegro-rest-api
php-allegro-rest-api copied to clipboard
You can't set multiple values of a filter
Let's say I'm making the following call, which works fine:
$api->offers->listing->get([
'phrase' => 'sukienka',
'category.id' => 124264,
'parameter.11323' => 2 // używane
]);
The thing is, parameter.11323
could have multiple values, i.e. both 2
(używane) and 246514
(nowe z defektem), but there's seemingly no way to pass them both. Putting them into an array ('parameter.11323' => ['2', '246514']
) doesn't work, because http_build_query()
transforms them into parameter.11323[0]=2¶meter.11323[1]=246514
, while API expects something like parameter.11323=2¶meter.11323=246514
(as stated here).
Cool, now we know they don't use PHP. Sorry it took me so long to reply, I'll try my best to give it a look soon-ish.
I've made pull request that solves this problem