Allow to use _page and _per_page query parameters for /api/v1/checkouts
Created attachment 90771 [details] [review] Bug 23154: Add pagination to /api/v1/checkouts Allow to use _page and _per_page query parameters for /api/v1/checkouts Also fix a timezone problem in t/db_dependent/api/v1/checkouts.t Test plan: 1. With your favorite REST tester tool, or directly in the browser, fetch http://koha/api/v1/checkouts and check that you have results 2. Fetch /api/v1/checkouts?_per_page=1&page=1 and check that only the first result is returned. Check that response contains headers X-Total-Count and Link 3. Fetch /api/v1/checkouts?_per_page=1&page=2 and check that only the second result is returned. Check that response contains headers X-Total-Count and Link 4. prove t/db_dependent/api/v1/checkouts.t
Created attachment 90787 [details] [review] Bug 23154: Add pagination to /api/v1/checkouts Allow to use _page and _per_page query parameters for /api/v1/checkouts Also fix a timezone problem in t/db_dependent/api/v1/checkouts.t Test plan: 1. With your favorite REST tester tool, or directly in the browser, fetch http://koha/api/v1/checkouts and check that you have results 2. Fetch /api/v1/checkouts?_per_page=1&_page=1 and check that only the first result is returned. Check that response contains headers X-Total-Count and Link 3. Fetch /api/v1/checkouts?_per_page=1&_page=2 and check that only the second result is returned. Check that response contains headers X-Total-Count and Link 4. prove t/db_dependent/api/v1/checkouts.t Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 90910 [details] [review] Bug 23154: Add pagination to /api/v1/checkouts Allow to use _page and _per_page query parameters for /api/v1/checkouts Also fix a timezone problem in t/db_dependent/api/v1/checkouts.t Test plan: 1. With your favorite REST tester tool, or directly in the browser, fetch http://koha/api/v1/checkouts and check that you have results 2. Fetch /api/v1/checkouts?_per_page=1&_page=1 and check that only the first result is returned. Check that response contains headers X-Total-Count and Link 3. Fetch /api/v1/checkouts?_per_page=1&_page=2 and check that only the second result is returned. Check that response contains headers X-Total-Count and Link 4. prove t/db_dependent/api/v1/checkouts.t Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nice work! Pushed to master for 19.11.00
This may be useful to rewrite issues table in patron page with this API. See also Bug 15219.
Pushed to 19.05.x for 19.05.03 Small enhancement, I choose to backport to stable.
enhancement wont backport to 18.11.x