ikegami > WWW-Kickstarter-v1.6.0 > WWW::Kickstarter::Data::Categories

Download:
WWW-Kickstarter-v1.6.0.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

WWW::Kickstarter::Data::Categories - Kickstarter categories

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 ^

my @categories = $categories->categories;

Returns a WWW::Kickstarter::Data::Category object for each Kickstarter category.

my @categories = $categories->top_level_categories;

Returns a WWW::Kickstarter::Data::Category object for each top-level Kickstarter category.

API CALLS ^

refetch

   $categories = $categories->refetch();

Refetches the categories 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.

METHODS ^

visit

   sub visitor {
      my ($category, $depth, $visit_next, $num_subcategories, @args) = @_;
      ...
   }

   $categories->visit(\&visitor, @args);

   $categories->visit({ visitor => \&visitor, %opts }, @args);

Traverses the category hiearchy in a depth-first, alphabetical manner.

The visitor is called with the following arguments:

Options:

Examples

VERSION, BUGS, KNOWN ISSUES, SUPPORT, AUTHORS, COPYRIGHT & LICENSE ^

See WWW::Kickstarter

syntax highlighting: