WebService::Kramerius::API4::User - Class to user endpoint in Kramerius v4+ API.
use WebService::Kramerius::API4::User; my $obj = WebService::Kramerius::API4::User->new(%params); my $profile = $obj->profile; my $user = $obj->user;
new
my $obj = WebService::Kramerius::API4::User->new(%params);
Constructor.
library_url
Library URL.
This parameter is required.
Default value is undef.
output_dispatch
Output dispatch hash structure. Key is content-type and value is subroutine, which converts content to what do you want.
Default value is blank hash array.
Returns instance of object.
profile
my $profile = $obj->profile;
Get user profile from Kramerius system.
Returns string with JSON.
user
my $user = $obj->user;
Get user from Kramerius system.
new(): Parameter 'library_url' is required. From Class::Utils::set_params(): Unknown parameter '%s'.
use strict; use warnings; use WebService::Kramerius::API4::User; if (@ARGV < 1) { print STDERR "Usage: $0 library_url\n"; exit 1; } my $library_url = $ARGV[0]; my $obj = WebService::Kramerius::API4::User->new( 'library_url' => $library_url, ); my $profile_json = $obj->profile; print $profile_json."\n"; # Output for 'http://kramerius.mzk.cz/', pretty print. # {}
use strict; use warnings; use WebService::Kramerius::API4::User; if (@ARGV < 1) { print STDERR "Usage: $0 library_url\n"; exit 1; } my $library_url = $ARGV[0]; my $obj = WebService::Kramerius::API4::User->new( 'library_url' => $library_url, ); my $user_json = $obj->user; print $user_json."\n"; # Output for 'http://kramerius.mzk.cz/', pretty print. # { # "lname": "not_logged", # "firstname": "not_logged", # "surname": "not_logged", # "session": {}, # "roles": [ # { # "name": "common_users", # "id": 1 # } # ], # "id": -1, # "labels": [] # }
WebService::Kramerius::API4::Base.
https://github.com/michal-josef-spacek/WebService-Kramerius-API4
Michal Josef Špaček mailto:skim@cpan.org
http://skim.cz
© Michal Josef Špaček 2015-2023
BSD 2-Clause License
0.02
To install WebService::Kramerius::API4, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Kramerius::API4
CPAN shell
perl -MCPAN -e shell install WebService::Kramerius::API4
For more information on module installation, please visit the detailed CPAN module installation guide.