Bug 34055: Add API client class to get items
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 25 Apr 2023 10:11:51 +0000 (12:11 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 22 Sep 2023 13:52:47 +0000 (10:52 -0300)
commit4ffe9a6ed99c463d7126b920ff9a026cd68195f4
tree3a30cb3b7606b50f29eada97aefd3b7f8ff82728
parent5f55775f402d4f4b56ab82426588b202d6f327ce
Bug 34055: Add API client class to get items

This patch add a new item-api-client.js API client to fetch items using
our /items REST API endpoint.

Test plan:
Add the following two lines to one of the existing Vue component (in
data() for instance) and hit the view that is using it.
  let client = APIClient.item
  client.items.getAll().then((items) => console.log(items))
Notice that you see all the items in the console.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Was failing the pretty test, fixed with yarn pretty
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/js/vue/fetch/api-client.js
koha-tmpl/intranet-tmpl/prog/js/vue/fetch/item-api-client.js [new file with mode: 0644]