WWW::Kickstarter::Data::Reward - Kickstarter reward data
use WWW::Kickstarter; my $email = '...'; # Your Kickstarter login credentials my $password = '...'; my $ks = WWW::Kickstarter->new(); $ks->login($email, $password); my $iter = $ks->projects_ending_soon(); while (my ($project) = $iter->get()) { my @rewards = $project->rewards; ... }
my $reward_id = $reward->id;
Returns the numerical id of the reward. The special id 0 refers to the special "No Reward" reward.
0
my $project_id = $reward->project_id;
Returns the numerical id of the project associated with this reward. This returns undef for the special "No Reward" reward (id 0).
undef
my $reward_text = $reward->text;
Returns the reward's text.
my $min_pledge = $reward->min_pledge;
Returns the minimum pledge required to obtain this reward. The amount is in the currency returned by the associated projects currency.
currency
my $max_backers = $reward->max_backers;
Returns the maximum number of backers which can select this reward, or undef if there is no maximum.
my $backers_count = $reward->backers_count;
Returns the number of backers that have selected this reward. This returns undef for the special "No Reward" reward (id 0).
Notably, this object can't be refetched.
my $project = $reward->project();
Fetches and returns the project associated with this reward as a WWW::Kickstarter::Data::Project object.
See WWW::Kickstarter
To install WWW::Kickstarter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Kickstarter
CPAN shell
perl -MCPAN -e shell install WWW::Kickstarter
For more information on module installation, please visit the detailed CPAN module installation guide.