Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Spotify Web Api Php Laravel Package

jwilsson/spotify-web-api-php

View on GitHub
Deep Wiki
Context7

Fetching Spotify Featured Content

If you wish to access content that's featured and/or curated by Spotify there are a number of methods available to achieve that.

Getting a list of new releases

Note: This method is only available to extended quota apps.

$releases = $api->getNewReleases([
    'country' => 'se',
]);

foreach ($releases->albums->items as $album) {
    echo '<a href="' . $album->external_urls->spotify . '">' . $album->name . '</a> <br>';
}

Getting a list of featured playlists

$playlists = $api->getFeaturedPlaylists([
    'country' => 'se',
    'locale' => 'sv_SE',
    'timestamp' => '2015-01-17T21:00:00', // Saturday night
]);

foreach ($playlists->playlists->items as $playlist) {
    echo '<a href="' . $playlist->external_urls->spotify . '">' . $playlist->name . '</a> <br>';
}

Getting a list of Spotify categories

Note: This method is only available to extended quota apps.

$categories = $api->getCategoriesList([
    'country' => 'se',
    'locale' => 'sv_SE',
    'limit' => 10,
    'offset' => 0,
]);

foreach ($categories->categories->items as $category) {
    echo '<a href="' . $category->href . '">' . $category->name . '</a><br>';
}

Getting a single Spotify category

Note: This method is only available to extended quota apps.

$category = $api->getCategory('dinner', [
    'country' => 'se',
]);

echo '<a href="' . $category->href . '">' . $category->name . '</a>';

Getting a category's playlists

$playlists = $api->getCategoryPlaylists('dinner', [
    'country' => 'se',
    'limit' => 10,
    'offset' => 0
]);

foreach ($playlists->playlists->items as $playlist) {
    echo '<a href="' . $playlist->href . '">' . $playlist->name . '</a><br>';
}

Getting list of markets where Spotify is available

Note: This method is only available to extended quota apps.

$markets = $api->getMarkets();

print_r($markets);

Please see the method reference for more available options for each method.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor
spatie/laravel-javascript-views