WWW::Kickstarter::Data::Category - Kickstarter category data
use WWW::Kickstarter; my $email = '...'; # Your Kickstarter login credentials my $password = '...'; my $ks = WWW::Kickstarter->new(); $ks->login($email, $password); my $categories = $ks->categories(); $categories->visit(sub{ my ($category, $depth, $visit_next) = @_; say " " x $depth, $category->name; 1 while $visit_next->(); });
my $category_id = $category->id;
Returns the numerical id of the category.
my $category_slug = $category->slug;
Returns the keyword id of the category.
my $category_name = $category->name;
Returns the category's name.
my @categories = $category->subcategories;
Returns the subcategories of this category as WWW::Kickstarter::Data::Category objects.
This information is only evailable if this object was obtained (directly or indirectly) from a WWW::Kickstarter::Data::Categories object. An exception will be thrown otherwise.
$category = $category->refetch();
Refetches the category 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 $projects_iter = $category->projects(%opts);
Returns an iterator that fetches and returns projects in the specified category as WWW::Kickstarter::Data::Project objects.
It accepts the same options as WWW::Kickstarter's projects.
projects
my $projects_iter = $category->projects_recommended(%opts);
Returns an iterator that fetches and returns the recommended projects in the specified category as WWW::Kickstarter::Data::Project objects.
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.