NAME

WWW::Kickstarter::Data::Category - Kickstarter category data

SYNOPSIS

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->();
});

ACCESSORS

id

my $category_id = $category->id;

Returns the numerical id of the category.

slug

my $category_slug = $category->slug;

Returns the keyword id of the category.

name

my $category_name = $category->name;

Returns the category's name.

subcategories

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.

API CALLS

refetch

$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.

projects

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.

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.

It accepts the same options as WWW::Kickstarter's projects.

VERSION, BUGS, KNOWN ISSUES, DOCUMENTATION, SUPPORT, AUTHOR, COPYRIGHT AND LICENSE

See WWW::Kickstarter