Net::Async::Spotify::API - Common Wrapper Package for Spotify API Classes.
Created to give you back Generic Spotify API wrapper. Not to be used by itself, as in Net::Async::Spotify object must be present.
use Net::Async::Spotify; use Net::Async::Spotify::API; my $spotify = Net::Async::Spotify->new; my $api = Net::Async::Spotify::API->new( spotify => Net::Async::Spotify->new, # Required apis => [qw(albums tracks)], # optional ); ref($api->albums); # Net::Async::Spotify::API::Albums # However the way it should be used is the following: my $spotify = Net::Async::Spotify->new(..., apis => [qw(albums tracks)]); # With apis being optional, and if not set all APIs classes will be present. $spotify->api->player->skip_users_playback_to_next_track->get();
Common Wrapper class to be used in order to give you access for all available Spotify APIs It will create an instance for the requested API when invoked. also you can limit which APIs you want to be available by passing them in apis
apis
Initiate Spotify API Common wrapper. Accepts:
Net::Async::Spotify object must be passed.
Net::Async::Spotify
arrayref of the needed Spotify APIs to be availabe, if not passed will define all available APIs.
List of available APIs for Spotify. Official list found here https://developer.spotify.com/documentation/web-api/reference/#reference-index These are the defined classes for them:
Net::Async::Spotify::API::Albums
Net::Async::Spotify::API::Artists
Net::Async::Spotify::API::Base
Net::Async::Spotify::API::Browse
Net::Async::Spotify::API::Episodes
Net::Async::Spotify::API::Follow
Net::Async::Spotify::API::Library
Net::Async::Spotify::API::Markets
Net::Async::Spotify::API::Personalization
Net::Async::Spotify::API::Player
Net::Async::Spotify::API::Playlists
Net::Async::Spotify::API::Search
Net::Async::Spotify::API::Shows
Net::Async::Spotify::API::Tracks
Net::Async::Spotify::API::Users
To install Net::Async::Spotify, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Async::Spotify
CPAN shell
perl -MCPAN -e shell install Net::Async::Spotify
For more information on module installation, please visit the detailed CPAN module installation guide.