| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package WWW::Giraffi::API::Log; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 1 |  |  | 1 |  | 6 | use strict; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 47 |  | 
| 4 | 1 |  |  | 1 |  | 5 | use warnings; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 26 |  | 
| 5 | 1 |  |  | 1 |  | 1008 | use Time::Piece; | 
|  | 1 |  |  |  |  | 10057 |  | 
|  | 1 |  |  |  |  | 6 |  | 
| 6 |  |  |  |  |  |  |  | 
| 7 | 1 |  |  | 1 |  | 109 | use parent qw(WWW::Giraffi::API::Request); | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 10 |  | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | our $VERSION = '0.2_04'; | 
| 10 |  |  |  |  |  |  |  | 
| 11 |  |  |  |  |  |  | sub all { | 
| 12 |  |  |  |  |  |  |  | 
| 13 | 0 |  |  | 0 | 1 |  | my ( $self, $other_options ) = @_; | 
| 14 | 0 |  |  |  |  |  | return $self->search(undef, $other_options); | 
| 15 |  |  |  |  |  |  | } | 
| 16 |  |  |  |  |  |  |  | 
| 17 |  |  |  |  |  |  | sub search { | 
| 18 |  |  |  |  |  |  |  | 
| 19 | 0 |  |  | 0 | 1 |  | my ( $self, $conditions, $other_options ) = @_; | 
| 20 | 0 |  |  |  |  |  | my $arrayref = $self->get( "logs/axion.json", $conditions, $other_options ); | 
| 21 | 0 | 0 |  |  |  |  | if ($self->use_time_piece) { | 
| 22 | 0 |  |  |  |  |  | my $tmp_arrayref = []; | 
| 23 | 0 |  |  |  |  |  | foreach my $ref(@{$arrayref}) { | 
|  | 0 |  |  |  |  |  |  | 
| 24 | 0 |  |  |  |  |  | $ref->{executed_at} = localtime($ref->{executed_at}); | 
| 25 | 0 |  |  |  |  |  | $ref->{created_at}  = localtime($ref->{created_at}); | 
| 26 | 0 |  |  |  |  |  | $ref->{checked_at}  = localtime($ref->{checked_at}); | 
| 27 | 0 |  |  |  |  |  | push @{$tmp_arrayref}, $ref; | 
|  | 0 |  |  |  |  |  |  | 
| 28 |  |  |  |  |  |  | } | 
| 29 | 0 |  |  |  |  |  | $arrayref = $tmp_arrayref; | 
| 30 |  |  |  |  |  |  | } | 
| 31 | 0 |  |  |  |  |  | return $arrayref; | 
| 32 |  |  |  |  |  |  | } | 
| 33 |  |  |  |  |  |  |  | 
| 34 |  |  |  |  |  |  | sub count { | 
| 35 |  |  |  |  |  |  |  | 
| 36 | 0 |  |  | 0 | 1 |  | my ( $self, $conditions, $other_options ) = @_; | 
| 37 | 0 |  |  |  |  |  | return $self->get( "logs/axion/count.json", $conditions, $other_options ); | 
| 38 |  |  |  |  |  |  | } | 
| 39 |  |  |  |  |  |  |  | 
| 40 |  |  |  |  |  |  | 1; | 
| 41 |  |  |  |  |  |  |  | 
| 42 |  |  |  |  |  |  | __END__ |