NAME
Net::COLOURlovers - Interface to COLOURlovers.com's API
VERSION
version 0.01
SYNOPSIS
use Net::COLOURlovers;
my $cl = Net::COLOURlovers->new;
my $pattern = $cl->pattern_random;
my @colors = $cl->colors_top( { 'numResults' => 5 } );
A sample page built using this API can be found at: http://bit.ly/qtIepU.
METHOD FORMAT
Each method listed below has its input and output parametres specified in sections titled Input and Output. These sections are followed by the parametre type:
UNDEF- accepts no parametreSCALAR- accepts/returns aSCALARHASHREF- accepts/returns aHASHARRAYREFofHASHREFs - accepts/returns anARRAYreference which hasHASHreferences as its elements
ATTRIBUTES
new
Constructs and returns a Net::COLOURlovers object.
METHODS
color
Input: SCALAR
'color_name'A 6-character hexadecimal value like
6B4106.
Output: HASHREF
idtitleuserNamenumViewsnumVotesnumCommentsnumHeartsrankdateCreatedhexrgbredgreenblue
hsvhuesaturationvalue
descriptionurlimageUrlbadgeUrlapiUrl
colors, colors_new and colors_top
Input: HASHREF (optional)
loverhueRangebriRangekeywordskeywordExactorderColsortBynumResultsresultOffset
Output: ARRAYREF of HASHREFs
Format same as that for "color".
color_random
Input: UNDEF
Output: HASHREF
Format same as that for "color".
lover
Input: SCALAR
'lover_name'A valid COLOURlovers.com username.
Output: HASHREF
userNamedateRegistereddateLastActiveratinglocationnumColorsnumPalettesnumCommentsMadenumCommentsOnProfilecommentsurlapiUrl
lovers, lovers_new and lovers_top
Input: HASHREF (optional)
orderColsortBynumResultsresultOffset
Output: ARRAYREF of HASHREFs
Format same as that for "lover".
palette
Input: SCALAR
'palette_id'A valid palette ID like
113451.
Output: HASHREF
idtitleuserNamenumViewsnumVotesnumCommentsnumHeartsrankdateCreatedcolorsdescriptionurlimageUrlbadgeUrlapiUrl
palettes, palettes_new and palettes_top
Input: HASHREF (optional)
loverhueOptionhexkeywordskeywordExactorderColsortBynumResultsresultOffsetshowPaletteWidths
Output: ARRAYREF of HASHREFs
Format same as that for "palette".
palette_random
Input: UNDEF
Output: HASHREF
Format same as that for "palette".
pattern
Input: SCALAR
'pattern_id'A valid pattern ID like
1451.
Output: ARRAYREF of HASHREFs
idtitleuserNamenumViewsnumVotesnumCommentsnumHeartsrankdateCreatedcolorsdescriptionurlimageUrlbadgeUrlapiUrl
patterns, patterns_new and patterns_top
Input: HASHREF (optional)
loverhueOptionhexkeywordskeywordExactorderColsortBynumResultsresultOffset
Output: ARRAYREF of HASHREFs
Format same as that for "pattern".
pattern_random
Input: UNDEF
Output: HASHREF
Format same as that for "pattern".
stats_colors
Returns total number of colors.
stats_lovers
Returns total number of lovers.
stats_palettes
Returns total number of palettes.
stats_patterns
Returns total number of patterns.
SEE ALSO
COLOURLovers API Documentation
ATTRIBUTION CREDIT
AUTHOR
Alan Haggai Alavi <alanhaggai@alanhaggai.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Alan Haggai Alavi.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.