Open im-trisha opened 1 year ago
Hi @GiuseppeFn!
Obviously you understand both parameters page
and page_size
, but your need is slightly more refined, as you want to start at the nth product regardless of the page size, right?
@alexgarel @stephanegigandet Is there a parameter like start_offset
, something like start_offset=7&page_size=10
that would make it possible to get the products from 7 to 16?
Hi @monsieurtanuki, that's exaclty what i was trying to achieve
Hi, we don't have that today, but we could add something like that in a future version of the search API.
This would be great! Please notice me if anything changes :) @stephanegigandet
Why - Problem description
i'm implementing kind of a pagination in my application. well, kinda, so i have to use an offset, for example: i first request 10 foods with the search term 'nute', using PageSize(10), then, i want 20 other elements, but this time i obviously have to skip the first 10 this could be simply achieved by PageSize(20) and start_offset: 10 in the request query
What - Proposed solution
well, add a start_offset parameter and (Like PageOffset(10)) NOTE: I'm asking this because i can't manage to find anything in this dart wrapper, thus, if i've understood right the OFF api has a start_offset parameter.
Alternatives you've considered
this would obviously be simple, i just make 2 request with PageSize(10), the first with Page(1) and the second with Page(2) but, i have to make 2 request, or make a request asking 20+10,