Closed lnielsen closed 5 years ago
Needs a change to views:RecordsListResource.get()
with something along the lines of:
size = request.values.get('size', default_results_size, type=int)
page = request.values.get('page', None, type=int)
from = request.values.get('from', None, type=int)
if from is not None and page is not None:
abort(400, ... explain ...)
if page is not None:
from = page * size
if from is None:
from = 0
if from < 0:
abort()
if size < 1:
abort()
from
and page
cannot be specified at the same timefrom >= 0
, page > 0
or size > 0
must be true
Trying to implement an infinite scroll with the Invenio REST API is somewhat complicated from the fact that you need to provide
page
+size
parameters. Would be easier if it wasfrom
andsize
. Also, it would be useful to be able to turn off aggregations for all but the first request (when in an infinite scroll). Via Cottage Labs