Lines 785-800
on the API.
Link Here
|
785 |
sub to_api { |
785 |
sub to_api { |
786 |
my ($self, $args) = @_; |
786 |
my ($self, $args) = @_; |
787 |
|
787 |
|
788 |
my @embeds = keys %{ $args->{embed} }; |
|
|
789 |
my $remaining_embeds = {}; |
790 |
|
791 |
foreach my $embed (@embeds) { |
792 |
$remaining_embeds = delete $args->{embed}->{$embed} |
793 |
unless $self->can($embed); |
794 |
} |
795 |
|
796 |
my $response = $self->SUPER::to_api( $args ); |
788 |
my $response = $self->SUPER::to_api( $args ); |
797 |
my $biblioitem = $self->biblioitem->to_api({ embed => $remaining_embeds }); |
789 |
my $biblioitem = $self->biblioitem->to_api; |
798 |
|
790 |
|
799 |
return { %$response, %$biblioitem }; |
791 |
return { %$response, %$biblioitem }; |
800 |
} |
792 |
} |
801 |
- |
|
|