NAME

Net::Async::Spotify::API - Common Wrapper Package for Spotify API Classes.

SYNOPSIS

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();

DESCRIPTION

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

METHODS

new

Initiate Spotify API Common wrapper. Accepts:

spotify

Net::Async::Spotify object must be passed.

apis

arrayref of the needed Spotify APIs to be availabe, if not passed will define all available APIs.

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: