NAME
WebService::Spotify - A simple Perl interface to the Spotify Web API
SYNOPSIS
my $spotify = WebService::Spotify->new;
my $results = $spotify->search('weezer', limit => 20);
say $_->{name} for @{$results->{tracks}->{items}};
More examples can be found in the eg/ directory.
METHODS
See Method::Signatures for details of the parameter spec used below.
Refer to the Spotify API documentation for details on the methods and parameters.
Methods that take item IDs (such as the track, album and artist methods) accept URN, URL or simple ID types. The following 3 ids are all acceptable IDs:
http://open.spotify.com/track/3HfB5hBU0dmBt8T0iCmH42
spotify:track:3HfB5hBU0dmBt8T0iCmH42
3HfB5hBU0dmBt8T0iCmH42
The following methods are supported:
album ($album_id)
returns a single album given the album's ID, URN or URL
album_tracks ($album_id)
Get Spotify catalog information about an album's tracks
albums (\@albums)
returns a list of albums given the album IDs, URNs, or URLs
artist ($artist_id)
returns a single artist given the artist's ID, URN or URL
artist_albums ($artist, :$album_type, :$country, :$limit = 20, :$offset = 0)
Get Spotify catalog information about an artist’s albums
artist_top_tracks ($artist, :$country = 'US')
Get Spotify catalog information about an artist’s top 10 tracks by country.
artists (\@artists)
returns a list of artists given the artist IDs, URNs, or URLs
me()
returns info about me
next ($result)
returns the next result given a result
previous ($result)
returns the previous result given a result
search ($q, limit => 10, offset => 0, type => 'track')
searches for an item
track ($track_id)
returns a single track given the track's ID, URN or URL
tracks (\@track_ids)
returns a list of tracks given the track IDs, URNs, or URLs
user ($user_id)
Gets basic profile information about a Spotify User
user_playlist ($user_id, :$playlist_id, :$fields)
Gets playlist of a user
user_playlist_add_tracks ($user_id, $playlist_id, $tracks, :$position)
Adds tracks to a playlist
user_playlist_create ($user_id, $name, :$public = 1)
Creates a playlist for a user
user_playlists ($user_id)
Gets playlists of a user
AUTHOR
Nick Langridge <nickl@cpan.org>
CREDITS
This module was ported from Spotipy, a Python wrapper for the Spotify Web API
LICENSE
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
SEE ALSO
WebService::EchoNest - wrapper for the EchoNest API which has some integration with the Spotify Web API
Net::Spotify - wrapper for the old Spotify metadata API
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 46:
Non-ASCII character seen before =encoding in 'artist’s'. Assuming UTF-8