line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finance::GDAX::API::Time; |
2
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
3
|
1
|
|
|
1
|
|
16391
|
use 5.20.0; |
|
1
|
|
|
|
|
3
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
5
|
1
|
|
|
1
|
|
409
|
use Moose; |
|
1
|
|
|
|
|
448218
|
|
|
1
|
|
|
|
|
7
|
|
6
|
1
|
|
|
1
|
|
8232
|
use Finance::GDAX::API; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
52
|
|
7
|
1
|
|
|
1
|
|
10
|
use namespace::autoclean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
extends 'Finance::GDAX::API'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub get { |
12
|
1
|
|
|
1
|
1
|
5
|
my $self = shift; |
13
|
1
|
|
|
|
|
21
|
$self->method('GET'); |
14
|
1
|
|
|
|
|
21
|
$self->path('/time'); |
15
|
1
|
|
|
|
|
6
|
return $self->send; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
19
|
|
|
|
|
|
|
1; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 NAME |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Finance::GDAX::API::Time - Time |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 SYNOPSIS |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
use Finance::GDAX::API::Time; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
$time = Finance::GDAX::API::Time->new; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# Get current time |
32
|
|
|
|
|
|
|
$time_hash = $time->get; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head2 DESCRIPTION |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Gets the time reported by GDAX. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 METHODS |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head2 C<get> |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Returns a hash representing the GDAX API server's notion of current |
43
|
|
|
|
|
|
|
time. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
From the GDAX API: |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
{ |
48
|
|
|
|
|
|
|
"iso": "2015-01-07T23:47:25.201Z", |
49
|
|
|
|
|
|
|
"epoch": 1420674445.201 |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 AUTHOR |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Mark Rushing <mark@orbislumen.net> |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Home Grown Systems, SPC. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
64
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |
67
|
|
|
|
|
|
|
|