Net::Spotify - Perl interface to the Spotify Metadata API
Version 0.03
use Net::Spotify; my $spotify = Net::Spotify->new(); # lookup a track my $track_xml = $spotify->lookup( uri => 'spotify:track:6NmXV4o6bmp704aPGyTVVG' ); # search an artist my $artist_xml = $spotify->search( 'artist', q => 'hendrix' );
This module provides a simple interface to the Spotify Metadata API https://developer.spotify.com/technologies/web-api/. The API allows to explore Spotify's music catalogue. It is possible to lookup a specific Spotify URI and retrieve various information about the resource it represents, and search for artists, albums and tracks. The output is in XML format.
Class constructor.
Performs a lookup on a specific Spotify URI. Net::Spotify::Lookup is used for handling the request.
Mandatory, represents the Spotify URI. Example: spotify:artist:4YrKBkKSVeqDamzBPWVnSJ
spotify:artist:4YrKBkKSVeqDamzBPWVnSJ
Optional, a comma separated list of words that defines the detail level in the response. Allowed values depend on the Spotify URI type.
For album: track and trackdetail For artist: album and albumdetail For track: none
album
track
trackdetail
artist
albumdetail
# lookup an album and retrieve detailed information about all its tracks $spotify->lookup( uri => 'spotify:album:6G9fHYDCoyEErUkHrFYfs4', extras => 'trackdetail' );
Performs a search. Net::Spotify::Search is used for handling the request.
Mandatory, represent the type of search. Possible values are: album, artist, track.
Mandatory, it's the search string.
Optional, represent the page of the resultset to return, defaults to 1.
# search all the tracks where the track name, artist or album matches the # the query string (purple) and return the results in page 2 $spotify->search( 'track', q => 'purple', page => 2 );
Net::Spotify::Service, 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.