Net::Spotify::Service - Perl interface to the Spotify Metadata API
Version 0.03
# in your subclass use base 'Net::Spotify::Service'; # the only required method to define in the subclass # is format_request, which should return an HTTP::Request # object sub format_request { my ($self, @parameters) = @_; # build the URI here my $uri = URI->new( ... ); return HTTP::Request->new('GET', $uri); }
This module is not intended to be used alone, but as a base for subclasses that implement a specific Spotify service. The two currently available services are lookup and search.
lookup
search
https://developer.spotify.com/technologies/web-api/.
Class constructor.
Accessor for the base URL of the Spotify API endpoint. Returns http://ws.spotify.com.
http://ws.spotify.com
Accessor for the format of the responses. Currently only XML is supported and is only used by the search service. Returns xml.
xml
Builds the request used by make_request(). This method must be defined in the subclasses. It must return an HTTP::Request object.
make_request()
All the parameters passed from make_request().
Makes the real request to the Spotify Metadata API and handles the response. Returns the XML content in case of success or the error code and string in case of error.
The parameters that must be parsed and used to build the request. See format_request() defined in the subclasses.
format_request()
Accessor to the LWP::UserAgent object used for making the requests.
Accessor to the Spotify service version, currently '1'.
Net::Spotify, Net::Spotify::Lookup, Net::Spotify::Search
Net::Spotify
Net::Spotify::Lookup
Net::Spotify::Search
Edoardo Sabadelli, <edoardo at cpan.org>
<edoardo at cpan.org>
Please report any bugs or feature requests to bug-net-spotify at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Spotify. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-net-spotify at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Net::Spotify
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-Spotify
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Net-Spotify
CPAN Ratings
http://cpanratings.perl.org/d/Net-Spotify
Search CPAN
http://search.cpan.org/dist/Net-Spotify/
This product uses a SPOTIFY API but is not endorsed, certified or otherwise approved in any way by Spotify. Spotify is the registered trade mark of the Spotify Group.
Copyright 2009 Edoardo Sabadelli, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Net::Spotify, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Spotify
CPAN shell
perl -MCPAN -e shell install Net::Spotify
For more information on module installation, please visit the detailed CPAN module installation guide.