trs-80 / WWW-Spotify

Perl wrapper for Spotify Web API
Other
5 stars 3 forks source link

client_auth_required info of api methods is outdated #4

Open jazzkutya opened 5 years ago

jazzkutya commented 5 years ago

for example search method needs client id and secret. there could be a general mechanism to override client_auth_required when calling a method

atm i use this workaround:

sub sp_search {
    my $self   = shift;
    my $q      = shift;
    my $type   = shift;
    my $extras = shift;
    return $self->send_get_request(
        {
            method => 'search',
            q      => $q,
            type   => $type,
            extras => $extras,
            client_auth_required => 1
        }
    );
};

and call this sub instead of the search method with an explicit $self arg

oalders commented 5 years ago

Is this the only method that you have to work around or are there other affected ones?

trs-80 commented 1 year ago

I believe client auth is now required by default on all endpoints. I need to set aside some time to update accordingly. In the meantime you can use the force_client_auth to workaround this without having to create your own method.