File Coverage

blib/lib/Finance/LocalBitcoins/API/Request/OrderBook.pm
Criterion Covered Total %
statement 25 25 100.0
branch n/a
condition n/a
subroutine 12 12 100.0
pod 0 6 0.0
total 37 43 86.0


line stmt bran cond sub pod time code
1             package Finance::LocalBitcoins::API::Request::OrderBook;
2 1     1   6 use base qw(Finance::LocalBitcoins::API::Request);
  1         2  
  1         83  
3 1     1   6 use strict;
  1         2  
  1         33  
4              
5 1     1   6 use constant URL => 'https://localbitcoins.com/bitcoincharts/%s/orderbook.json';
  1         1  
  1         51  
6 1     1   5 use constant ATTRIBUTES => qw(currency);
  1         2  
  1         48  
7 1     1   5 use constant REQUEST_TYPE => 'GET';
  1         2  
  1         107  
8 1     1   6 use constant IS_PRIVATE => 0;
  1         2  
  1         214  
9              
10 1     1 0 4 sub url { sprintf URL, shift->currency }
11 2     2 0 7 sub attributes { ATTRIBUTES }
12 3     3 0 15 sub request_type { REQUEST_TYPE }
13 2     2 0 12 sub is_private { IS_PRIVATE }
14 5     5 0 8 sub currency { my $self = shift; $self->get_set(@_) }
  5         22  
15 1     1 0 3 sub is_ready_to_send { defined shift->currency }
16              
17             1;
18              
19             __END__