Lines 23-28
use Carp qw( croak );
Link Here
|
23 |
use base qw(Koha::ExternalContent); |
23 |
use base qw(Koha::ExternalContent); |
24 |
use WebService::ILS::OverDrive::Patron; |
24 |
use WebService::ILS::OverDrive::Patron; |
25 |
use C4::Context; |
25 |
use C4::Context; |
|
|
26 |
use Koha; |
26 |
use LWP::UserAgent; |
27 |
use LWP::UserAgent; |
27 |
|
28 |
|
28 |
=head1 NAME |
29 |
=head1 NAME |
Lines 223-228
sub checkout_download_url {
Link Here
|
223 |
|
224 |
|
224 |
my $ua = LWP::UserAgent->new; |
225 |
my $ua = LWP::UserAgent->new; |
225 |
$ua->max_redirect(0); |
226 |
$ua->max_redirect(0); |
|
|
227 |
$ua->agent( 'Koha/'.Koha::version() ); |
226 |
my $response = $ua->get( |
228 |
my $response = $ua->get( |
227 |
"https://patron.api.overdrive.com/v1/patrons/me/checkouts/".$item_id."/formats/downloadredirect", |
229 |
"https://patron.api.overdrive.com/v1/patrons/me/checkouts/".$item_id."/formats/downloadredirect", |
228 |
'Authorization' => "Bearer ".$self->client->access_token, |
230 |
'Authorization' => "Bearer ".$self->client->access_token, |
229 |
- |
|
|