WWW::Kickstarter::Data::Project - Kickstarter project 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()) { print($project->name, "\n"); }
my $project_id = $project->id;
Returns the numerical id of the project.
my $project_slug = $project->slug;
Returns creator-selected keyword id of the project, or undef if it doesn't have one.
my $project_name = $project->name;
Returns the project's name.
my $project_url = $project->url;
Returns the web address of the project's main page.
my $project_blurb = $project->blurb;
Returns a short plain-text description of the project.
my $project_launched_at = $project->launched_at;
Returns the epoch timestamp (as returned by time) of the project's launch.
time
my $project_deadline = $project->deadline;
Returns the epoch timestamp (as returned by time) of the project's deadline.
my $project_backers_count = $project->backers_count;
Returns the number of backers the project has.
my $currency = $project->currency;
Returns the currency used for this project's goal, its pledges and its rewards.
my $project_goal = $project->goal;
Returns the amount the project is attempting to raise. The amount is in the currency returned by currency.
currency
my $project_pledged = $project->pledged;
Returns the amount that has been pledged to the project. The amount is in the currency returned by currency.
my $project_progress = $project->progress;
Returns the progress towards the project's goal. For example, a value greater than or equal to 1.00 indicates the goal was reached.
my $project_progress_pct = $project->progress_pct;
Returns the progress towards the project's goal as a percent. For example, a value greater than or equal to 100 indicates the goal was reached
my $user = $project->creator;
Returns the creator of the project as an WWW::Kickstarter::Data::User object.
Some data will not available without a refetch.
my $location = $project->location;
Returns the location of the project as an WWW::Kickstarter::Data::Location object.
my $category = $project->category;
Returns the category of the project as an WWW::Kickstarter::Data::Category object.
my $category_id = $project->category_id;
Returns the id of the category of the project.
Deprecated: Use $project->category->id instead.
$project->category->id
my $category_name = $project->category_name;
Returns the name of the category of the project.
Deprecated: Use $project->category->name instead.
$project->category->name
$project = $project->refetch();
Refetches this project from Kickstarter.
This ensures the data is up to date, and it will populate fields that may not be provided by objects created by some API calls.
my @rewards = $project->rewards(); my @rewards = $project->rewards( force => 1 );
Returns the rewards of the specified project as WWW::Kickstarter::Data::Reward objects.
When fetching an individual project, Kickstarter includes "light" reward objects in its response. By default, these are the objects returned by this method.
If these rewards objects are not available, or if force => 1 is specified, the "full" reward objects will be fetched and returned.
force => 1
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.