Skip to content
Browse files

documentation for Author

  • Loading branch information...
1 parent 73c9d26 commit ee5975811ff49a2d9485f359f3e96af604c05402 @moritz committed Jun 21, 2011
Showing with 54 additions and 1 deletion.
  1. +54 −1 lib/WebService/Libris/Author.pm
View
55 lib/WebService/Libris/Author.pm
@@ -41,4 +41,57 @@ sub books {
shift->collection_from_dom('description[about^="http://libris.kb.se/resource/bib/"]');
}
-1;
+=head1 NAME
+
+WebService::Libris::Author - Author objects for WebService::Libris
+
+=head1 SYNOSPIS
+
+ use 5.010;
+ use WebService::Libris;
+ my $author = WebService::Libris->new(
+ type => 'autho',
+ id => '246603',
+ );
+ say $author->libris_key; # main name entry in the db
+ for ($author->names) {
+ say " name variant: $_";
+ }
+ say " identification URL: ", $author->same_as if $author->same_as;
+
+=head1 DESCRIPTIONO
+
+Author objects as returned from the libris.kb.se API search.
+
+All of the following methods can return undef or the empty list if the
+information is not available.
+
+=head1 METHODS
+
+C<WebService::Libris::Author> inherits from L<WebService::Libris>, and thus has all of its methods.
+
+=head2 libris_key
+
+Returns the canonical name of the author, as stored in libris.
+
+=head2 names
+
+Returns a list of alternative names used for that author. Often includes
+spelling variations and translations into other languages.
+
+=head2 birthyear
+
+Returns the birth year of the author.
+
+=head2 same_as
+
+Returns an URL that uniquely identifies the author. Those URLs typically
+point to viaf.org or dbpedia.org
+
+=head2 books
+
+Returns a collection of books written by this author.
+
+=cut
+
+1;

0 comments on commit ee59758

Please sign in to comment.
Something went wrong with that request. Please try again.