Bug 17387: add items embed to deleted biblios API
Signed-off-by: Michaela <michaela.sieber@kit.edu> Sponsored-by: ByWater Solutions Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
2191941971
commit
4c3cf66681
|
|
@ -25,6 +25,7 @@ use Koha::Biblioitem;
|
|||
use Koha::Biblio::Metadata;
|
||||
use Koha::Old::Biblio::Metadatas;
|
||||
use Koha::Old::Biblioitems;
|
||||
use Koha::Old::Items;
|
||||
use Koha::SearchEngine::Indexer;
|
||||
|
||||
=head1 NAME
|
||||
|
|
@ -93,6 +94,19 @@ sub biblioitem {
|
|||
return Koha::Old::Biblioitems->find( { biblionumber => $self->biblionumber } );
|
||||
}
|
||||
|
||||
=head3 items
|
||||
|
||||
my $items = $deleted_biblio->items;
|
||||
|
||||
Returns the related Koha::Old::Items for this deleted biblio
|
||||
|
||||
=cut
|
||||
|
||||
sub items {
|
||||
my ($self) = @_;
|
||||
return Koha::Old::Items->search( { biblionumber => $self->biblionumber } );
|
||||
}
|
||||
|
||||
=head3 to_api
|
||||
|
||||
my $json = $deleted_biblio->to_api;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,15 @@
|
|||
- $ref: "../swagger.yaml#/parameters/q_param"
|
||||
- $ref: "../swagger.yaml#/parameters/q_body"
|
||||
- $ref: "../swagger.yaml#/parameters/request_id_header"
|
||||
- name: x-koha-embed
|
||||
in: header
|
||||
required: false
|
||||
description: Embed list sent as a request header
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- items
|
||||
produces:
|
||||
- application/json
|
||||
- application/marcxml+xml
|
||||
|
|
|
|||
Loading…
Reference in New Issue