Pages: 1
I am trying 'pwg.tags.getImages' with field 'tag_name' containing more than one value and I do not seem able to find the correct format for entering it as an array.
I have tried various combinations of square brackets, %5B or %5D, quoting the tag_name or not, separating by either comma or semi-colon, but none seem to work. If I use a single TAG value, then that works correctly.
Can someone help with the correct format for an array field entry either the 'ws.htm' way or the 'URL' way
Thanks
Last edited by mcl (2013-01-10 13:39:32)
Offline
in ws.htm there is not brackets
just write "2|16" (no quotes) in "tag_id" field
but perhaps it doesn't work... I corrected some little bugs when a rewrote this file (for Piwigo 2.5)
for the url you must use the common way to pass an array in a GET query
ws.php?format=rest&method=pwg.tags.getImages&tag_id[]=2&tag_id[]=16
Offline
Brilliant - Many Thanks
Both ways work as you said with piwigo.com
mcl
Offline
Hi, I have the same question but 10 years after, the answer seem to be no more working in my case, I get the "<err code="1003" msg="cat_id must only contain positive integers" />" if I try &tag_id[]=2&tag_id[]=16
can someone help me to get image list of several categories through API,
Thank you
Offline
in fact it works perfectly well, sorry for the inconvenience, the problem were elsewhere in my called URL
Offline
Pages: 1