Peter Mayr

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);
 
 print $Library->url->scheme; 

 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];
  print $Library->email->[0]->user;
 }else{
  print $Library->email;
  print $Library->email->user;
 }

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

  • 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

    The URL of the institituion as an URI object. Has the predicate function has_url

  • provides

    The URL of a resource the institituion provides as an URI object. Typically the OPAC. Has the predicate function has_url

  • wikipedia

    Wikpedia entry about the institution as an URI object. Has the predicate function has_wikipedia

  • countryName

    Has the predicate function has_countryName

  • locality

    The city or town where institution resides. Has the predicate function has_locality

  • 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 as an Email::Address object. 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

  • long

    The longitude of the place. Has the predicate function has_long.

  • 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