| 1 | package # private | ||
| 2 | Net::COLOURlovers::Stat; | ||
| 3 | |||
| 4 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 1 | ▶ | use JSON qw( from_json ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 0 | ▶ | sub stats_colors { |
|
Subroutine
stats_colors: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 10 | 0 | my $self = shift; | |
| 11 | |||
| 12 | my $response = | ||
| 13 | 0 | $self->{'ua'} | |
| 14 | ->post("http://www.colourlovers.com/api/stats/colors?format=json"); | ||
| 15 | |||
| 16 | 0 | return ( from_json $response->content )->{'total'}; | |
| 17 | } | ||
| 18 | |||
| 19 | 0 | ▶ | sub stats_lovers { |
|
Subroutine
stats_lovers: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 20 | 0 | my $self = shift; | |
| 21 | |||
| 22 | my $response = | ||
| 23 | 0 | $self->{'ua'} | |
| 24 | ->post("http://www.colourlovers.com/api/stats/lovers?format=json"); | ||
| 25 | |||
| 26 | 0 | return ( from_json $response->content )->{'total'}; | |
| 27 | } | ||
| 28 | |||
| 29 | 0 | ▶ | sub stats_palettes { |
|
Subroutine
stats_palettes: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 30 | 0 | my $self = shift; | |
| 31 | |||
| 32 | my $response = | ||
| 33 | 0 | $self->{'ua'} | |
| 34 | ->post("http://www.colourlovers.com/api/stats/palettes?format=json"); | ||
| 35 | |||
| 36 | 0 | return ( from_json $response->content )->{'total'}; | |
| 37 | } | ||
| 38 | |||
| 39 | 0 | ▶ | sub stats_patterns { |
|
Subroutine
stats_patterns: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 40 | 0 | my $self = shift; | |
| 41 | |||
| 42 | my $response = | ||
| 43 | 0 | $self->{'ua'} | |
| 44 | ->post("http://www.colourlovers.com/api/stats/patterns?format=json"); | ||
| 45 | |||
| 46 | 0 | return ( from_json $response->content )->{'total'}; | |
| 47 | } | ||
| 48 | |||
| 49 | 1 | 1; | |
| 50 | |||
| 51 | __END__ | ||