WebService::Pandora::Partner - Pandora WebService API Partner
# creating a new Partner object package WebService::Pandora::Partner::MyPartner; use base 'WebService::Pandora::Partner'; sub new { my $caller = shift; my $class = ref( $caller ); $class = $caller if ( !$class ); my $self = $class->SUPER::new( username => 'username', password => 'password', deviceModel => 'model', decryption_key => 'key', encryption_key => 'key', host => 'tuner.pandora.com' ); return $self; } # using a partner object $partner = WebService::Pandora::Partner::MyPartner->new(); $result = $partner->login() or die( $partner->error() );
This module is a base class that should be inherited and not used directly. When logging in to the Pandora API, you must first login using a particular partner, such as an Apple iOS or Android device. Each partner has its own credentials and encryption/decryption keys, and some use different HTTP hosts than others to query the API. The WebService::Pandora package provides modules for several known partners and will default to using WebService::Pandora::Partner::iOS if one isn't provided.
Creates a new WebService::Pandora::Partner object with the arguments given. All of the options are required and used by the login() method.
The username of the partner to use when logging in.
The password of the partner to use when logging in.
The device model name to use when logging in.
The encryption key to use when encrypting the JSON data being sent to the Pandora API method.
The decryption key to use when decrypting the JSON data send back from the Pandora API method.
The host portion of the URL to use when issuing the HTTP request to the Pandora API method.
Returns a hashref containing the information from the login request when the login was successful, or a false value on failure. Internally, this will execute the auth.partnerLogin Pandora API method using the WebService::Pandora::Method library.
$result = $partner->login() or die( $partner->error() );
Returns a string containing a message about why the login call failed. The error string may come from internally in the module, from a failed HTTP request, or from the Pandora API itself.
WebService::Pandora WebService::Pandora::Method
Mitch McCracken <mrmccrac@gmail.com>
To install WebService::Pandora, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Pandora
CPAN shell
perl -MCPAN -e shell install WebService::Pandora
For more information on module installation, please visit the detailed CPAN module installation guide.