cloudkey-php
cloudkey-php copied to clipboard
search sort problem
How could I sort a media.search listing result in created desc order?
$res = $cloudkey->media->search(array( 'per_page' => 6, 'page' => 1, 'fields' => array('id', 'meta.title'), 'sort' => array(array('-created')), 'query' => 'meta.title: football' ));
This code give me a "need more than 1 value to unpack" error. If I put only one array, I've got the error: {"sort": {"0": "must be of list type"}}
I can't find any doc on this point. Thanks.
It seems that I could do the sort with the "query" arg
'query' => 'meta.category: football SORT:-created'
So what's the purpose of the "sort" argument of the media.search
api call?