View | Details | Raw Unified | Return to bug 41521
Collapse All | Expand All

(-)a/lib/WebService/ILS.pm (-5 / +5 lines)
Lines 228-234 sub BUILD { Link Here
228
=head2 user_agent
228
=head2 user_agent
229
229
230
As provided to constructor, or auto created. Useful if one wants to
230
As provided to constructor, or auto created. Useful if one wants to
231
change user agent attributes on the fly, eg 
231
change user agent attributes on the fly, eg
232
232
233
    $ils->user_agent->timeout(120);
233
    $ils->user_agent->timeout(120);
234
234
Lines 379-385 An example: Link Here
379
        access_token => $session{ils_access_token},
379
        access_token => $session{ils_access_token},
380
        access_token_type => $session{ils_access_token_type},
380
        access_token_type => $session{ils_access_token_type},
381
    });
381
    });
382
 
382
383
    my $checkouts = $ils->checkouts;
383
    my $checkouts = $ils->checkouts;
384
384
385
=head2 Authentication at the provider
385
=head2 Authentication at the provider
Lines 408-418 An example: Link Here
408
        client_id => $client_id,
408
        client_id => $client_id,
409
        client_secret => $client_secret,
409
        client_secret => $client_secret,
410
    });
410
    });
411
    my $redirect_url = $ils->auth_url("http://myapp.com/ils-auth");
411
    my $redirect_url = $ils->auth_url("https://myapp.com/ils-auth");
412
    $response->redirect($redirect_url);
412
    $response->redirect($redirect_url);
413
    ...
413
    ...
414
    After successful authentication at the provider, provider redirects
414
    After successful authentication at the provider, provider redirects
415
    back to specified app url (http://myapp.com/ils-auth)
415
    back to specified app url (https://myapp.com/ils-auth)
416
416
417
    /ils-auth handler:
417
    /ils-auth handler:
418
    my $auth_token = $req->param( $ils->auth_token_param_name )
418
    my $auth_token = $req->param( $ils->auth_token_param_name )
Lines 584-590 sub check_response { Link Here
584
584
585
Example:
585
Example:
586
586
587
    my $res = eval { $ils->checkout($id) }; 
587
    my $res = eval { $ils->checkout($id) };
588
    if ($@) {
588
    if ($@) {
589
        my $msg = $ils->error_message($@);
589
        my $msg = $ils->error_message($@);
590
        display($msg);
590
        display($msg);
(-)a/lib/WebService/ILS/OverDrive.pm (-2 / +2 lines)
Lines 34-41 use parent qw(WebService::ILS::JSON); Link Here
34
34
35
use constant API_VERSION => "v1";
35
use constant API_VERSION => "v1";
36
36
37
use constant DISCOVERY_API_URL => "http://api.overdrive.com/";
37
use constant DISCOVERY_API_URL => "https://api.overdrive.com/";
38
use constant TEST_DISCOVERY_API_URL => "http://integration.api.overdrive.com/";
38
use constant TEST_DISCOVERY_API_URL => "https://integration.api.overdrive.com/";
39
39
40
=head1 CONSTRUCTOR
40
=head1 CONSTRUCTOR
41
41
(-)a/lib/WebService/ILS/OverDrive/Library.pm (-1 / +1 lines)
Lines 42-48 sub collection_token { Link Here
42
    if (my $collection_token = $self->SUPER::collection_token) {
42
    if (my $collection_token = $self->SUPER::collection_token) {
43
        return $collection_token;
43
        return $collection_token;
44
    }
44
    }
45
    
45
46
    $self->native_library_account;
46
    $self->native_library_account;
47
    my $collection_token = $self->SUPER::collection_token
47
    my $collection_token = $self->SUPER::collection_token
48
      or die "Library has no collections\n";
48
      or die "Library has no collections\n";
(-)a/lib/WebService/ILS/OverDrive/Patron.pm (-5 / +5 lines)
Lines 31-38 use Data::Dumper; Link Here
31
31
32
use parent qw(WebService::ILS::OverDrive);
32
use parent qw(WebService::ILS::OverDrive);
33
33
34
use constant CIRCULATION_API_URL => "http://patron.api.overdrive.com/";
34
use constant CIRCULATION_API_URL => "https://patron.api.overdrive.com/";
35
use constant TEST_CIRCULATION_API_URL => "http://integration-patron.api.overdrive.com/";
35
use constant TEST_CIRCULATION_API_URL => "https://integration-patron.api.overdrive.com/";
36
use constant OAUTH_BASE_URL => "https://oauth.overdrive.com/";
36
use constant OAUTH_BASE_URL => "https://oauth.overdrive.com/";
37
use constant TOKEN_URL => OAUTH_BASE_URL . 'token';
37
use constant TOKEN_URL => OAUTH_BASE_URL . 'token';
38
use constant AUTH_URL => OAUTH_BASE_URL . 'auth';
38
use constant AUTH_URL => OAUTH_BASE_URL . 'auth';
Lines 123-129 An example: Link Here
123
        client_secret => $client_secret,
123
        client_secret => $client_secret,
124
        library_id => $library_id,
124
        library_id => $library_id,
125
    });
125
    });
126
    my $redirect_url = $overdrive->auth_url("http://myapp.com/overdrive-auth");
126
    my $redirect_url = $overdrive->auth_url("https://myapp.com/overdrive-auth");
127
    $response->redirect($redirect_url);
127
    $response->redirect($redirect_url);
128
    ...
128
    ...
129
    /overdrive-auth handler:
129
    /overdrive-auth handler:
Lines 253-259 sub make_access_token_request { Link Here
253
            $user_id, $self->password, $self->website_id, $self->authorization_name
253
            $user_id, $self->password, $self->website_id, $self->authorization_name
254
        );
254
        );
255
    }
255
    }
256
    
256
257
    die $self->ERROR_NOT_AUTHENTICATED."\n";
257
    die $self->ERROR_NOT_AUTHENTICATED."\n";
258
}
258
}
259
259
Lines 277-283 sub collection_token { Link Here
277
    if (my $collection_token = $self->SUPER::collection_token) {
277
    if (my $collection_token = $self->SUPER::collection_token) {
278
        return $collection_token;
278
        return $collection_token;
279
    }
279
    }
280
    
280
281
    $self->native_patron; # sets collection_token as a side-effect
281
    $self->native_patron; # sets collection_token as a side-effect
282
    my $collection_token = $self->SUPER::collection_token
282
    my $collection_token = $self->SUPER::collection_token
283
      or die "Patron has no collections\n";
283
      or die "Patron has no collections\n";
(-)a/lib/WebService/ILS/RecordedBooks.pm (-2 / +1 lines)
Lines 639-645 sub native_item_summary { Link Here
639
639
640
=head2 native_holds ()
640
=head2 native_holds ()
641
641
642
See L<http://developer.rbdigital.com/endpoints/title-holds>
642
See L<https://developer.rbdigital.com/endpoints/title-holds>
643
643
644
=cut
644
=cut
645
645
646
- 

Return to bug 41521