SpotifyWebAPI\SpotifyWebAPI::unfollowPlaylist PHP Метод

unfollowPlaylist() публичный Метод

Requires a valid access token. https://developer.spotify.com/web-api/unfollow-playlist/
public unfollowPlaylist ( string $userId, string $playlistId ) : boolean
$userId string ID of the user who owns the playlist.
$playlistId string ID of the playlist to unfollow
Результат boolean Whether the playlist was successfully unfollowed.
    public function unfollowPlaylist($userId, $playlistId)
    {
        $headers = $this->authHeaders();
        $headers['Content-Type'] = 'application/json';
        $uri = '/v1/users/' . $userId . '/playlists/' . $playlistId . '/followers';
        $this->lastResponse = $this->request->api('DELETE', $uri, [], $headers);
        return $this->lastResponse['status'] == 200;
    }