NAME
App::Kramerius::V4 - Base class for kramerius4 script.
SYNOPSIS
use App::Kramerius::V4;
my $app = App::Kramerius::V4->new;
my $exit_code = $app->run;
METHODS
new
my $app = App::Kramerius::V4->new;
Constructor.
Returns instance of object.
run
my $exit_code = $app->run;
Run.
Returns 1 for error, 0 for success.
ERRORS
new():
Parameter 'lwp_user_agent' must be a LWP::UserAgent object.
run():
Cannot download '%s'.
Cannot decode content of '%s' as JSON.
Kramerius system for '%s' isn't version 4 of API.
Object with '%s' isn't document.
Unsupported image format '%s'.
Unsupported image format. Unknown issue.
EXAMPLE
use strict;
use warnings;
use App::Kramerius::V4;
# Arguments.
@ARGV = (
'mzk',
'224d66f8-f48e-4a92-b41e-87c88a076dc0',
);
# Run.
exit App::Kramerius::V4->new->run;
# Output like:
# Download http://kramerius.mzk.cz/search/api/v5.0/item/uuid:224d66f8-f48e-4a92-b41e-87c88a076dc0/streams
# Download http://kramerius.mzk.cz/search/api/v5.0/item/uuid:224d66f8-f48e-4a92-b41e-87c88a076dc0/full
# Save 224d66f8-f48e-4a92-b41e-87c88a076dc0.jpg
DEPENDENCIES
Class::Utils, Data::Kramerius, Error::Pure, Getopt::Std, IO::Barf, JSON::XS, LWP::UserAgent.
SEE ALSO
- App::Kramerius::URI
-
Base class for kramerius-uri script.
- Data::Kramerius
-
Information about all Kramerius systems.
REPOSITORY
https://github.com/michal-josef-spacek/App-Kramerius-V4
AUTHOR
Michal Josef Špaček mailto:skim@cpan.org
LICENSE AND COPYRIGHT
© 2021 Michal Josef Špaček
BSD 2-Clause License
VERSION
0.02