| 1 | package Bio::Cellucidate::Bookshelf; | ||
| 2 | |||
| 3 | =pod | ||
| 4 | |||
| 5 | =head1 NAME | ||
| 6 | |||
| 7 | Bio::Cellucidate::Bookshelf | ||
| 8 | |||
| 9 | =head1 SYNOPSIS | ||
| 10 | |||
| 11 | # Set your authentication, see L<http://cellucidate.com/api> for more info. | ||
| 12 | $Bio::Cellucidate::AUTH = { login => 'email@server', api_key => '12334567890' }; | ||
| 13 | |||
| 14 | # All your bookshelves | ||
| 15 | $bookshelves = Bio::Cellucidate::Bookshelf->find( $hashref ); | ||
| 16 | |||
| 17 | # Bookshelf by a bookshelf id | ||
| 18 | $bookshelf = Bio::Cellucidate::Bookshelf->get( $bookshelf_id ); | ||
| 19 | |||
| 20 | # All books on a bookshelf (given an id); | ||
| 21 | $books = Bio::Cellucidate::Bookshelf->books( $bookshelf_id ); | ||
| 22 | |||
| 23 | |||
| 24 | =head1 SEE ALSO | ||
| 25 | |||
| 26 | L<http://cellucidate.com> | ||
| 27 | |||
| 28 | =head1 AUTHOR | ||
| 29 | |||
| 30 | Brian Kaney, E<lt>brian@vermonster.com<gt> | ||
| 31 | |||
| 32 | =head1 COPYRIGHT AND LICENSE | ||
| 33 | |||
| 34 | Copyright (C) 2010 by Brian Kaney | ||
| 35 | |||
| 36 | This library is free software; you can redistribute it and/or modify | ||
| 37 | it under the same terms as Perl itself, either Perl version 5.8.9 or, | ||
| 38 | at your option, any later version of Perl 5 you may have available. | ||
| 39 | |||
| 40 | =cut | ||
| 41 | |||
| 42 | 7 | ▶ | use base Bio::Cellucidate::Base; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 43 | |||
| 44 | 6 | ▶ | sub route { '/bookshelves'; } |
|
Subroutine
route: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 45 | 3 | ▶ | sub element { 'bookshelf'; } |
|
Subroutine
element: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 46 | |||
| 47 | # Bio::Cellucidate::Bookshelf->books($bookshelf_id); | ||
| 48 | 1 | ▶ | sub books { |
|
Subroutine
books: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 49 | 1 | my $self = shift; | |
| 50 | 1 | my $id = shift; | |
| 51 | 1 | my $format = shift; | |
| 52 | |||
| 53 | 1 | $self->rest('GET', $self->route . "/$id" . Bio::Cellucidate::Book->route, $format)->processResponseAsArray(Bio::Cellucidate::Book->element); | |
| 54 | } | ||
| 55 | |||
| 56 | 7 | 1; | |