NAME

WWW::Phanfare::API - Perl wrapper for Phanfare API

VERSION

Version 0.03

SYNOPSIS

Create object. Developer API keys required.

use WWW::Phanfare::API;
my $papi = WWW::Phanfare::API->new(
  api_key     => 'xxx',
  private_key => 'yyy',
);

Authentication with account:

   my $session = $papi->Authenticate(
      email_address => 'my@email',
      password      => 'zzz',
   )
   die "Cannot authenticate: $session->{code_value}"
     unless $session->{'stat'} eq 'ok';

Or authenticate as guest:

$papi->AuthenticateGuest();

List of albums:

my $albumlist = $papi->GetAlbumList(
  target_uid => $session->{session}{uid}
)->{albums}{album};

printf(
  "%s %s %s\n",
  $_->{album_id}, substr($_->{album_start_date}, 0, 10), $_->{album_name}
) for @$albumlist;

DESCRIPTION

Perl wrapper the Phanfare API. A developer API key is required for using this module.

SUBROUTINES/METHODS

Refer to methods and required parameters are listed on http://help.phanfare.com/index.php/API .

api_key and private_key is only required for the constructor, not for individual methods.

Methods return hash references. The value of the 'stat' key will be 'ok' if the call succeeded. Value of 'code_value' key has error message.

new

Create a new API agent.

AUTHOR

Soren Dossing, <netcom at sauber.net>

BUGS

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

SUPPORT

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

perldoc WWW::Phanfare::API

You can also look for information at:

SEE ALSO

LICENSE AND COPYRIGHT

Copyright 2010 Soren Dossing.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.