NAME

WebService::Lobid::Organisation - interface to the lobid-Organisations API

SYNOPSIS

 my $Library = WebService::Lobid::Organisation->new(isil=> 'DE-380');
 
 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;

METHODS

new(isil=>$isil)

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

ATTRIBUTES

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

  • use_ssl

    inherited from WebService::Lobid, true if HTTP::Tiny can use SSL, otherwise 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_

DEPENDENCIES

HTTP::Tiny, JSON, Log::Any, Moo, Try::Tiny

LOGGING

This module uses the Log::Any Framework

AUTHOR

Peter Mayr <pmayr@cpan.org>

REPOSITORY

The source code is also on GitHub <https://github.com/hatorikibble/webservice-lobid-organisations>. Pull requests and bug reports welcome!

LICENCE AND COPYRIGHT

GNU GPL V3

Peter Mayr 2016