| 1 | package WebService::ILS::RecordedBooks::Partner; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use Modern::Perl; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | =encoding utf-8 | ||||||||||
| 6 | |||||||||||
| 7 | =head1 NAME | ||||||||||
| 8 | |||||||||||
| 9 | WebService::ILS::RecordedBooks::Partner - RecordedBooks partner API | ||||||||||
| 10 | |||||||||||
| 11 | =head1 SYNOPSIS | ||||||||||
| 12 | |||||||||||
| 13 | use WebService::ILS::RecordedBooks::Partner; | ||||||||||
| 14 | |||||||||||
| 15 | =head1 DESCRIPTION | ||||||||||
| 16 | |||||||||||
| 17 | L<WebService::ILS::RecordedBooks::Partner> - services | ||||||||||
| 18 | that use trusted partner credentials | ||||||||||
| 19 | |||||||||||
| 20 | See L<WebService::ILS::RecordedBooks> | ||||||||||
| 21 | |||||||||||
| 22 | =cut | ||||||||||
| 23 | |||||||||||
| 24 | 1 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 25 | |||||||||||
| 26 | 1 | ▶ | use parent qw(WebService::ILS::RecordedBooks::PartnerBase); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 27 | |||||||||||
| 28 | 0 | ▶ | sub circulation_action_base_url { | ||||||||
|
Subroutine
circulation_action_base_url: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 29 | 0 | my $self = shift; | |||||||||
| 30 | 0 | ▶ | my $patron_id = shift or croak "No patron id"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 31 | |||||||||||
| 32 | 0 | return $self->library_action_base_url."/patrons/${patron_id}"; | |||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | =head1 DISCOVERY METHODS | ||||||||||
| 36 | |||||||||||
| 37 | =head2 facet_search ($facets) | ||||||||||
| 38 | |||||||||||
| 39 | See C<native_facet_search()> below for $facets | ||||||||||
| 40 | |||||||||||
| 41 | =head2 named_query_search ($query, $media) | ||||||||||
| 42 | |||||||||||
| 43 | See C<native_named_query_search()> below for $query, $media | ||||||||||
| 44 | |||||||||||
| 45 | =head1 CIRCULATION METHOD SPECIFICS | ||||||||||
| 46 | |||||||||||
| 47 | Differences to general L<WebService::ILS> interface | ||||||||||
| 48 | |||||||||||
| 49 | =head2 patron_id ($email_or_id) | ||||||||||
| 50 | |||||||||||
| 51 | =head2 holds ($patron_id) | ||||||||||
| 52 | |||||||||||
| 53 | =head2 place_hold ($patron_id, $isbn) | ||||||||||
| 54 | |||||||||||
| 55 | =head2 checkouts ($patron_id) | ||||||||||
| 56 | |||||||||||
| 57 | =head2 checkout ($patron_id, $isbn) | ||||||||||
| 58 | |||||||||||
| 59 | =head2 renew ($patron_id, $isbn) | ||||||||||
| 60 | |||||||||||
| 61 | =head2 return ($patron_id, $isbn) | ||||||||||
| 62 | |||||||||||
| 63 | =cut | ||||||||||
| 64 | |||||||||||
| 65 | 1 | foreach my $sub (qw(place_hold remove_hold renew return)) { | |||||||||
| 66 | 1 | ▶ | no strict "refs"; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 67 | 0 | ▶ | *$sub = sub { | ||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||
| 68 | 0 | my $self = shift; | |||||||||
| 69 | 0 | ▶ | my $patron_id = shift or croak "No patron id"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 70 | 0 | ▶ | my $isbn = shift or croak "No isbn"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 71 | 0 | my $supersub = "SUPER::$sub"; | |||||||||
| 72 | 0 | return $self->$supersub($isbn, $patron_id); | |||||||||
| 73 | 4 | }; | |||||||||
| 74 | } | ||||||||||
| 75 | |||||||||||
| 76 | 0 | ▶ | sub checkout { | ||||||||
|
Subroutine
checkout: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||
| 77 | 0 | my $self = shift; | |||||||||
| 78 | 0 | ▶ | my $patron_id = shift or croak "No patron id"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 79 | 0 | ▶ | my $isbn = shift or croak "No isbn"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 80 | 0 | my $days = shift; | |||||||||
| 81 | 0 | return $self->SUPER::checkout($isbn, $days, $patron_id); | |||||||||
| 82 | } | ||||||||||
| 83 | |||||||||||
| 84 | |||||||||||
| 85 | =head1 NATIVE METHODS | ||||||||||
| 86 | |||||||||||
| 87 | =head2 native_quick_search ($query, $category) | ||||||||||
| 88 | |||||||||||
| 89 | $category can be one of 'all', 'title', 'author', or 'narrator'; | ||||||||||
| 90 | optional, defaults to 'all' | ||||||||||
| 91 | |||||||||||
| 92 | =cut | ||||||||||
| 93 | |||||||||||
| 94 | =head2 native_facet_search ($facets) | ||||||||||
| 95 | |||||||||||
| 96 | $facets can be either: | ||||||||||
| 97 | * a hashref of facet => [values], | ||||||||||
| 98 | * an arrayref of values | ||||||||||
| 99 | * a single value | ||||||||||
| 100 | |||||||||||
| 101 | =head2 native_named_query_search ($query, $media) | ||||||||||
| 102 | |||||||||||
| 103 | $query can be one of 'bestsellers', 'most-popular', 'newly-added' | ||||||||||
| 104 | $media can be 'eaudio' or 'ebook' | ||||||||||
| 105 | |||||||||||
| 106 | =head2 native_patron ($email_or_id) | ||||||||||
| 107 | |||||||||||
| 108 | =cut | ||||||||||
| 109 | |||||||||||
| 110 | 1 | 1; | |||||||||
| 111 | |||||||||||
| 112 | __END__ | ||||||||||