File Coverage

lib/Finance/GDAX/API/Currency.pm
Criterion Covered Total %
statement 14 18 77.7
branch n/a
condition n/a
subroutine 5 6 83.3
pod 1 1 100.0
total 20 25 80.0


line stmt bran cond sub pod time code
1             package Finance::GDAX::API::Currency;
2             our $VERSION = '0.01';
3 1     1   67018 use 5.20.0;
  1         5  
4 1     1   8 use warnings;
  1         3  
  1         315  
5 1     1   701 use Moose;
  1         857491  
  1         9  
6 1     1   10903 use Finance::GDAX::API;
  1         5  
  1         50  
7 1     1   10 use namespace::autoclean;
  1         4  
  1         10  
8              
9             extends 'Finance::GDAX::API';
10              
11             sub list {
12 0     0 1   my $self = shift;
13 0           $self->method('GET');
14 0           $self->path('/currencies');
15 0           return $self->send;
16             }
17              
18             __PACKAGE__->meta->make_immutable;
19             1;
20              
21             =head1 NAME
22              
23             Finance::GDAX::API::Currency - Currencies
24              
25             =head1 SYNOPSIS
26              
27             use Finance::GDAX::API::Currency;
28              
29             $currency = Finance::GDAX::API::Currency->new;
30              
31             # List all currencies
32             $currencies = $currency->list;
33              
34             =head2 DESCRIPTION
35              
36             Work with GDAX currencies.
37              
38             =head1 METHODS
39              
40             =head2 C<list>
41              
42             From the GDAX API:
43              
44             Returns an array of hashes of known currencies.
45              
46             Currency Codes
47              
48             Currency codes will conform to the ISO 4217 standard where
49             possible. Currencies which have or had no representation in ISO 4217
50             may use a custom code.
51              
52             [{
53             "id": "BTC",
54             "name": "Bitcoin",
55             "min_size": "0.00000001"
56             }, {
57             "id": "USD",
58             "name": "United States Dollar",
59             "min_size": "0.01000000"
60             }]
61              
62             =cut
63              
64              
65             =head1 AUTHOR
66              
67             Mark Rushing <mark@orbislumen.net>
68              
69             =head1 COPYRIGHT AND LICENSE
70              
71             This software is copyright (c) 2017 by Home Grown Systems, SPC.
72              
73             This is free software; you can redistribute it and/or modify it under
74             the same terms as the Perl 5 programming language system itself.
75              
76             =cut
77