WebSer...rDrive(3pm)
π NAME π
okay so bestie, gather round β this is WebService::ILS::OverDrive, the WebService::ILS module for OverDrive services. yes, that OverDrive. the library one. the one with the ebooks. π¦
(also, fun fact, the manual name is WebSer...rDrive(3pm) β section 3pm, Perl land, you know how it is π
)
β¨ SYNOPSIS β¨
use WebService::ILS::OverDrive::Library;
or
use WebService::ILS::OverDrive::Patron;
like... pick your fighter. Library or Patron. it's giving choose-your-own-adventure. π
πΈ DESCRIPTION πΈ
okay so there's two whole vibes here and you need to know which one you are:
WebService::ILS::OverDrive::Libraryβ anonymous discovery services. no individual user credentials required. no login, no drama, just vibes. π§WebService::ILS::OverDrive::Patronβ discovery and circulation services that require individual user credentials. so like, you gotta be somebody. bring your login. π
also go look at WebService::ILS β that's the parent situation, iykyk.
π«Ά CONSTRUCTOR π«Ά
new (%params_hash or $params_hashref)
bestie it takes a hash or a hashref, either one, we're flexible like that. π
Additional constructor params, and yes this is the whole list:
"test"β if set to true, use OverDrive test API urls. test urls! so you don't go messing with the real ones. very demure, very mindful. π
π₯ DISCOVERY METHODS π₯
search ($params_hashref)
Additional input params β one (1) of them:
"no_details"β if true, no metadata calls will be made for result items. which means literally onlyid,title,ratingandmediawill be available. that's it. that's the whole meal. if you wanted more, shoulda leftno_detailsoff. π
π NATIVE METHODS π
native_search ($params_hashref)
go read <https://developer.overdrive.com/apis/search> β the docs are right there, not me making it up, periodt.
native_search_[next|prev|first|last] ($data_as returned_by_native_search*)
this is for iterating through search result pages, and it's lowkey the best part. each native_search_*() method accepts a record returned by any native_search*() method as input. any of them. mix and match. iconic. β¨
Example, since a demo says a thousand words:
my $res = $od->native_search({q => "Dogs"});
while ($res) {
do_something($res);
$res = $od->native_search_next($res);
}
or
my $res = $od->native_search({q => "Dogs"});
my $last = $od->native_search_last($res);
my $next_to_last = $od->native_search_prev($last);
my $first = $od->native_search_first($next_to_last)
# Same as $od->native_search_first($last)
# Same as $res
native_item_metadata ($item_data as returned by native_search*)
native_item_availability ($item_data as returned by native_search*)
both of these eat an $item_data as returned by native_search*. yes, the same thing the other ones take. consistency, we love to see it. π
Example:
my $res = $od->native_search({q => "Dogs"});
foreach (@{ $res->{products} }) {
my $meta = $od->native_item_metadata($_);
my $availability = $od->native_item_availability($_);
...
}
π 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. free software!! go off, redistribute, whatever, it's yours. π
π AUTHOR π
Srdjan JankoviX <srdjan@catalyst.net.nz>
and that's the whole page bestie!! this one shipped as part of perl v5.36.0, dated 2022-11-29, in the WebSer...rDrive(3pm) manual β mwah, slay, go forth and search some Dogs. πΆπ
β
π¦ where this page comes from
- debian bookworm: libwebservice-ils-perl 0.18-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libwebservice-ils-perl 0.18-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libwebservice-ils-perl 0.18-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libwebservice-ils-perl 0.18-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libwebservice-ils-perl 0.18-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms