fixed an error in the pagination doc of the api
another small fix for you @axil ;)
closes #759 (closed)
Merge request reports
Activity
Pages should not be zero based I believe.
I agree, I don't think a page
0
makes sense. When you passpage=0
, it only ends up with aoffset(0)
in thepage
method. If you look at the implementation, passingpage(0)
orpage(1)
will both end up withoffset(0)
(because the method has to handle edge-cases) but I think documenting that the default page is1
makes more sense here (like in a real book pagination). Plus, imagine you have an algorithm that loop over API pages by starting withpage=0
and incrementing it, you'll have duplicate results since page 0 and 1 returns the same! ;)Thanks anyway @haynes, I will close this one since I'm trying to triage the currently opened MRs. Feel free to re-open/discuss this decision of course! :)