1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
package WebService::ILS::RecordedBooks::Partner;
use Modern::Perl;
=encoding utf-8
=head1 NAME
WebService::ILS::RecordedBooks::Partner - RecordedBooks partner API
=head1 SYNOPSIS
use WebService::ILS::RecordedBooks::Partner;
=head1 DESCRIPTION
L<WebService::ILS::RecordedBooks::Partner> - services
that use trusted partner credentials
See L<WebService::ILS::RecordedBooks>
=cut
use Carp;
use parent qw(WebService::ILS::RecordedBooks::PartnerBase);
sub circulation_action_base_url {
my $self = shift;
my $patron_id = shift or croak "No patron id";
return $self->library_action_base_url."/patrons/${patron_id}";
}
=head1 DISCOVERY METHODS
=head2 facet_search ($facets)
See C<native_facet_search()> below for $facets
=head2 named_query_search ($query, $media)
See C<native_named_query_search()> below for $query, $media
=head1 CIRCULATION METHOD SPECIFICS
Differences to general L<WebService::ILS> interface
=head2 patron_id ($email_or_id)
=head2 holds ($patron_id)
=head2 place_hold ($patron_id, $isbn)
=head2 checkouts ($patron_id)
=head2 checkout ($patron_id, $isbn)
=head2 renew ($patron_id, $isbn)
=head2 return ($patron_id, $isbn)
=cut
foreach my $sub (qw(place_hold remove_hold renew return)) {
no strict "refs";
*$sub = sub {
my $self = shift;
my $patron_id = shift or croak "No patron id";
my $isbn = shift or croak "No isbn";
my $supersub = "SUPER::$sub";
return $self->$supersub($isbn, $patron_id);
};
}
sub checkout {
my $self = shift;
my $patron_id = shift or croak "No patron id";
my $isbn = shift or croak "No isbn";
my $days = shift;
return $self->SUPER::checkout($isbn, $days, $patron_id);
}
=head1 NATIVE METHODS
=head2 native_quick_search ($query, $category)
$category can be one of 'all', 'title', 'author', or 'narrator';
optional, defaults to 'all'
=cut
=head2 native_facet_search ($facets)
$facets can be either:
* a hashref of facet => [values],
* an arrayref of values
* a single value
=head2 native_named_query_search ($query, $media)
$query can be one of 'bestsellers', 'most-popular', 'newly-added'
$media can be 'eaudio' or 'ebook'
=head2 native_patron ($email_or_id)
=cut
1;
__END__
=head1 LICENSE
Copyright (C) Catalyst IT NZ Ltd
Copyright (C) Bywater Solutions
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=head1 AUTHOR
Srdjan Janković E<lt>srdjan@catalyst.net.nzE<gt>
=cut
|