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

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

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: v1.6.0   Source  

NAME ^

WWW::Kickstarter - Retrieve information from Kickstarter

VERSION ^

Version 1.6.0

SYNOPSIS ^

   use WWW::Kickstarter;

   my $email    = '...';  # Your Kickstarter login credentials
   my $password = '...';

   my $ks = WWW::Kickstarter->new();
   my $myself = $ks->login($email, $password);

   my $iter = $ks->projects_ending_soon();
   while (my ($project) = $iter->()) {
      print($project->name, "\n");
   }

DESCRIPTION ^

This distribution provides access to Kickstarter's private API to obtain information about your account, other users and and projects.

CONSTRUCTOR ^

new

   my $ks = WWW::Kickstarter->new(%opts);

This is the starting point to using the API, after which you much login using the $ks->login method documented immediately below.

Options:

ACCESSORS ^

my_id

   my $user_id = $ks->my_id;

Returns the id of the logged-in user.

API CALLS ^

login

   my $myself = $ks->login($email, $password);

You must login using your standard Kickstarter credentials before you can query the API.

Returns a WWW::Kickstarter::Data::User::Myself object for the user that logged in.

myself

   my $myself = $ks->myself();

Fetches and returns the logged-in user as a WWW::Kickstarter::Data::User::Myself object.

my_notification_prefs

   my @notification_prefs = $ks->my_notification_prefs();

Fetches and returns the the logged-in user's notification preferences of backed projects as WWW::Kickstarter::Data::NotificationPref objects. The notification preferences for the project created last is returned first.

my_projects_created

   my @projects = $ks->my_projects_created();

Fetches and returns the projects created by the logged-in user as WWW::Kickstarter::Data::Project objects. The project created last is returned first.

my_projects_backed

   my $projects_iter = $ks->my_projects_backed(%opts);

Returns an iterator that fetches and returns the projects backed by the logged-in user as WWW::Kickstarter::Data::Project objects. The most recently backed project is returned first.

Note that some projects may be returned twice. This happens when the data being queried changes while the results are being traversed.

Options:

my_projects_starred

   my $projects_iter = $ks->my_projects_starred(%opts);

Returns an iterator that fetches and returns the projects starred by the logged-in user as WWW::Kickstarter::Data::Project objects. The most recently starred project is returned first.

Note that some projects may be returned twice. This happens when the data being queried changes while the results are being traversed.

Options:

user

   my $user = $ks->user($user_id);

Fetches and returns the specified user as a WWW::Kickstarter::Data::User object.

Note that the argument must be the user's numerical id (as returned by $user->id).

user_projects_created

   my @projects = $ks->user_projects_created($user_id);

Fetches and returns the projects created by the specified user as WWW::Kickstarter::Data::Project objects. The project created last is returned first.

Note that the argument must be the user's numerical id (as returned by $user->id).

project

   my $project = $ks->project($project_id);
   my $project = $ks->project($project_slug);

Fetches and returns the specified project as a WWW::Kickstarter::Data::Project object.

The argument may be the project's numerical id (as returned by $project->id) or its "slug" (as returned by $project->slug).

project_rewards

   my @rewards = $ks->project_rewards($project_id);
   my @rewards = $ks->project_rewards($project_slug);

Fetches and returns the rewards of the specified project as WWW::Kickstarter::Data::Reward objects.

The argument may be the project's numerical id (as returned by $project->id) or its "slug" (as returned by $project->slug).

projects

   my $projects_iter = $ks->projects(%opts);

Returns an iterator that fetches and returns all Kickstarter projects as WWW::Kickstarter::Data::Project objects.

Note that some projects may be returned twice, and some might be skipped. This happens when the data being queried changes while the results are being traversed.

Options:

projects_recommended

   my $projects_iter = $ks->projects_recommended(%opts);

Returns an iterator that fetches and returns recommended projects as WWW::Kickstarter::Data::Project objects.

It accepts the same options as projects.

projects_ending_soon

   my $projects_iter = $ks->projects_ending_soon(%opts);

Returns an iterator that fetches and returns projects ending soon as WWW::Kickstarter::Data::Project objects. The project closest to its deadline is returned first.

It accepts the same options as projects.

projects_recently_launched

   my $projects_iter = $ks->projects_recently_launched(%opts);

Returns an iterator that fetches and returns recently launched projects as WWW::Kickstarter::Data::Project objects. The most recently launched project is returned first.

It accepts the same options as projects.

popular_projects

   my $projects_iter = $ks->popular_projects(%opts);

Returns an iterator that fetches and returns popular projects as WWW::Kickstarter::Data::Project objects.

It accepts the same options as projects.

location

   my $location = $ks->location($location_id);

Fetches and returns the specified location as a WWW::Kickstarter::Data::Location object.

Note that the argument must be the location's numerical id (as returned by $location->id).

projects_near_location

   my $projects_iter = $ks->projects_near_location($location_id, %opts);

Returns an iterator that fetches and returns the projects near the specified location as WWW::Kickstarter::Data::Project objects.

The argument must be the location's id (as returned by $location->id).

It accepts the same options as projects.

category

   my $category = $ks->category($category_id);
   my $category = $ks->category($category_slug);
   my $category = $ks->category($category_name);

Fetches and returns the specified category as a WWW::Kickstarter::Data::Category object.

The argument may be the category's numerical id (as returned by $category->id), its "slug" (as returned by $category->slug) or its name (as returned by $category->name).

categories

    my $categories = $ks->categories();

Fetches and returns all the categories as a WWW::Kickstarter::Data::Categories object.

category_projects

   my $projects_iter = $ks->category_projects($category_id,   %opts);
   my $projects_iter = $ks->category_projects($category_slug, %opts);
   my $projects_iter = $ks->category_projects($category_name, %opts);

Returns an iterator that fetches and returns projects in the specified category as WWW::Kickstarter::Data::Project objects.

The argument may be the category's numerical id (as returned by $category->id), its "slug" (as returned by $category->slug) or its name (as returned by $category->name).

It accepts the same options as projects.

category_projects_recommended

   my $projects_iter = $ks->category_projects_recommended($category_id,   %opts);
   my $projects_iter = $ks->category_projects_recommended($category_slug, %opts);
   my $projects_iter = $ks->category_projects_recommended($category_name, %opts);

Returns an iterator that fetches and returns the recommended projects in the specified category as WWW::Kickstarter::Data::Project objects.

The argument may be the category's numerical id (as returned by $category->id), its "slug" (as returned by $category->slug) or its name (as returned by $category->name).

It accepts the same options as projects.

ERROR REPORTING ^

When an API call encounters an error, it throws a WWW::Kickstarter::Error object as an exception.

GARANTEE ^

Kickstarter has not provided a public API. As such, this distribution uses a private API to obtain information. The API is subject to incompatible change without notice. This has already happened, and may happen again. I cannot guarantee the continuing operation of this distribution.

BUGS AND KNOWN ISSUES ^

Please report any bugs or feature requests to bug-WWW-Kickstarter at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Kickstarter. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

The following issues are known:

Feel free to bug me (<ikegami@adaelis.com>) to work on these, or to submit a patch to the bug tracker.

SUPPORT ^

You can find documentation for this module with the perldoc command.

   perldoc WWW::Kickstarter

You can also look for information at:

AUTHORS ^

Eric Brine, <ikegami@adaelis.com>

Initial release assisted by Mark Olson's "Kickscraper" project for Ruby.

COPYRIGHT & LICENSE ^

No rights reserved.

The author has dedicated the work to the Commons by waiving all of his or her rights to the work worldwide under copyright law and all related or neighboring legal rights he or she had in the work, to the extent allowable by law.

Works under CC0 do not require attribution. When citing the work, you should not imply endorsement by the author.

syntax highlighting: