The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::Async::Spotify::Scope - Helper for Spotify Scopes

SYNOPSIS

    use Net::Async::Spotify::Scope qw(scopes images);

    my @all = scopes();
    my @needed = scopes(qw(ugc_image_upload user_read_recently_played));

    my @images_scopes = images();
    my $mod_lib = Net::Async::Spotify::Scope::user_library_modify();

    # Safe to call, even if Scope does not exist
    my $dne = Net::Async::Spotify::Scope::dne();

DESCRIPTION

Representation for Spotify Authorization Scopes defined in https://developer.spotify.com/documentation/general/guides/scopes methods exported will group scopes as categorized by Spotify.

METHODS

scopes

Returns list of Spotify Scopes, if no specific scopes requested; will return all scopes.

images

Returns list of Spotify Scopes for Images

listening_history

Returns list of Spotify Scopes for Listening History

spotify_connect

Returns list of Spotify Scopes for Spotify Connect

playback

Returns list of Spotify Scopes for Playback

playlists

Returns list of Spotify Scopes for Playlists

follow

Returns list of Spotify Scopes for Follow

library

Returns list of Spotify Scopes for Library

users

Retruns list of Spotify Scopes for Users

AUTOLOAD

An addition to this helper is that it will check if sub name called corresponde to any Spotify scope. And return a Scope, or log a warn message and return empty list when not found.