line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::ILS::RecordedBooks::Partner; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
539
|
use Modern::Perl; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
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 - services |
18
|
|
|
|
|
|
|
that use trusted partner credentials |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
See L |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=cut |
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
1
|
|
121
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
25
|
|
|
|
|
|
|
|
26
|
1
|
|
|
1
|
|
232
|
use parent qw(WebService::ILS::RecordedBooks::PartnerBase); |
|
1
|
|
|
|
|
231
|
|
|
1
|
|
|
|
|
5
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub circulation_action_base_url { |
29
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
30
|
0
|
0
|
|
|
|
|
my $patron_id = shift or croak "No patron id"; |
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 below for $facets |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head2 named_query_search ($query, $media) |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
See C below for $query, $media |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 CIRCULATION METHOD SPECIFICS |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Differences to general L 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
|
|
|
|
|
|
|
foreach my $sub (qw(place_hold remove_hold renew return)) { |
66
|
1
|
|
|
1
|
|
96
|
no strict "refs"; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
135
|
|
67
|
|
|
|
|
|
|
*$sub = sub { |
68
|
0
|
|
|
0
|
|
|
my $self = shift; |
69
|
0
|
0
|
|
|
|
|
my $patron_id = shift or croak "No patron id"; |
70
|
0
|
0
|
|
|
|
|
my $isbn = shift or croak "No isbn"; |
71
|
0
|
|
|
|
|
|
my $supersub = "SUPER::$sub"; |
72
|
0
|
|
|
|
|
|
return $self->$supersub($isbn, $patron_id); |
73
|
|
|
|
|
|
|
}; |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
sub checkout { |
77
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
78
|
0
|
0
|
|
|
|
|
my $patron_id = shift or croak "No patron id"; |
79
|
0
|
0
|
|
|
|
|
my $isbn = shift or croak "No isbn"; |
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; |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
__END__ |