| 1 | package Net::Async::Github::RateLimit::Core; | ||
| 2 | |||
| 3 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 3 | our $VERSION = '0.013'; # VERSION | |
| 7 | |||
| 8 | =head1 NAME | ||
| 9 | |||
| 10 | Net::Async::Github::RateLimit::Core - represents the current user's rate limit | ||
| 11 | |||
| 12 | =head1 METHODS | ||
| 13 | |||
| 14 | =head2 new | ||
| 15 | |||
| 16 | Instantiates. | ||
| 17 | |||
| 18 | =cut | ||
| 19 | |||
| 20 | 0 | ▶ | sub new { my $class = shift; bless { @_ }, $class } |
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 21 | |||
| 22 | =head2 limit | ||
| 23 | |||
| 24 | Current limit as a number of remaining requests. | ||
| 25 | |||
| 26 | =cut | ||
| 27 | |||
| 28 | 0 | ▶ | sub limit { shift->{limit} } |
|
Subroutine
limit: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 29 | |||
| 30 | =head2 remaining | ||
| 31 | |||
| 32 | Number of remaining requests. | ||
| 33 | |||
| 34 | =cut | ||
| 35 | |||
| 36 | 0 | ▶ | sub remaining { shift->{remaining} } |
|
Subroutine
remaining: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 37 | |||
| 38 | =head2 reset | ||
| 39 | |||
| 40 | When we expect the rate limit to be reset, as a UNIX epoch. | ||
| 41 | |||
| 42 | =cut | ||
| 43 | |||
| 44 | 0 | ▶ | sub reset : method { shift->{reset} } |
|
Subroutine
reset: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 45 | |||
| 46 | =head2 seconds_left | ||
| 47 | |||
| 48 | Number of seconds left before reset. | ||
| 49 | |||
| 50 | =cut | ||
| 51 | |||
| 52 | 0 | ▶ | sub seconds_left { shift->reset - time } |
|
Subroutine
seconds_left: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 53 | |||
| 54 | 3 | 1; | |
| 55 | |||