WebService::Lobid::Organisation - interface to the lobid-Organisations API
my $Library = WebService::Lobid::Organisation->new(isil=> 'DE-380'); if ($Library->status eq 'OK'){ printf("This Library is called '%s', its homepage is at '%s' and it can be found at %f/%f", $Library->name, $Library->url, $Library->lat, $Library->long ); if ($Library->has_wikipedia){ printf("%s has its own wikipedia entry: %s", $Library->name, $Library->wikipedia); } if ($Library->has_multiple_emails){ print $Library->email->[0]; }else{ print $Library->email; } }else{ print $Library->error; }
tries to fetch data for the organisation identified by the ISIL $isil. If an entry is found then the attribute found is set to true
$isil
found
If an error occurs, the attribute status is set to Error with the error message in $self-error>. Otherwise status is OK.
status
$self-
currently the following attributes are supported
api_url
inherited from WebService::Lobid, default is https://lobid.org/
api_status
inherited from WebService::Lobid, OK if api_url reachable, otherwise Error
Error
api_timeout
inherited from WebService::Lobid, default ist 3 seconds
use_ssl
inherited from WebService::Lobid, true if HTTP::Tiny can use SSL, otherwise false
false
found (true|false)
indicates if an entry is found
isil
the ISIL of the organisation. Has the predicate function has_isil.
name
Has the predicate function has_name.
url
Has the predicate function has_url
provides
Service URL, normally the OPAC, Has the predicate function has_provides
addressCountry
Has the predicate function has_addressCountry
addressLocality
The city or town where institution resides. Has the predicate function has_addressLocality
postalCode
Has the predicate function has_postalCoda
streetAddress
Has the predicate function has_streedAddress
email
Has the predicate function has_email. The email address for the instition including a mailto: prefix. A scalar if there ist just one email address, an array reference if there are more than one adresses (in this case has_multiple_emails is set to 1
has_multiple_emails
set to 1 if there is more than one address in email
lon
The longitude of the place. Has the predicate function has_lon.
lat
The latitude of the place. Has the predicate function has_
OK or Error
error
error message, if $self-status> is Error
HTTP::Tiny, JSON, Log::Any, Moo, Try::Tiny
This module uses the Log::Any Framework
Peter Mayr <pmayr@cpan.org>
The source code is also on GitHub <https://github.com/hatorikibble/webservice-lobid-organisations>. Pull requests and bug reports welcome!
0.005
GNU GPL V3
Peter Mayr 2016
To install WebService::Lobid::Organisation, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Lobid::Organisation
CPAN shell
perl -MCPAN -e shell install WebService::Lobid::Organisation
For more information on module installation, please visit the detailed CPAN module installation guide.