Cellucidate/Bookshelf.pm

filter: Statementstmt 100% 10 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 3 totaltotal 82.3% 14 / 17 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
route
1.0
element
1.0
CRAP 1.0
« Cellucidate/ModelRule.pm ↑ Summary Cellucidate.pm »
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;
« Cellucidate/ModelRule.pm ↑ Summary Cellucidate.pm »