Currently collaborating on a site with another developer, which is using ElementAPI pretty heavily for content delivery.
Is there a way to limit the number of returns on any given json feed? Say; only return the 10 most recent entries in any given channel? Or order the returned data by a specified field asc/desc?
A sample code:
'trucks.json' => [
'elementType' => 'Entry',
'criteria' => ['section' => 'trucks'],
'paginate' => false,
'transformer' => function(EntryModel $entry) {
return [
(int)$entry->id,
$entry->manufacturer,