Bug 23667: Add route to GET /items
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 23 Sep 2019 15:48:14 +0000 (12:48 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 29 Oct 2019 12:20:35 +0000 (12:20 +0000)
commit58da3de84ada910098024e535a7d2bbaf6caf84b
treee61cd247e4b2febba299670e64efe9ed16e31d9e
parent2ae0cc83f301e5e0215b35350eea39607f93e688
Bug 23667: Add route to GET /items

This patchset introduces a route to fetch items. It relies on the
already implemented code/mappings to get a single item.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/items.t
=> SUCCESS: Tests pass!
- Try the endpoint with your favourite API tool (Postman?)
- Sign off :-D

Note: to do exact searching on barcode, you need to build the query like
this:

GET /api/v1/items?external_id=<your_barcode>&_match=exact

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/REST/V1/Items.pm
t/db_dependent/api/v1/items.t