Download the PHP package soda-framework/spotify without Composer
On this page you can find all versions of the php package soda-framework/spotify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download soda-framework/spotify
More information about soda-framework/spotify
Files in soda-framework/spotify
Package spotify
Short Description A sweet Spotify suite built on Soda CMS
License MIT
Homepage https://github.com/soda-framework/spotify
Informations about the package spotify
Soda Spotify
A sweet spotify platform for Made in Katana
Installation
1) Firstly follow the instructions to install Soda CMS at: https://github.com/soda-framework/cms
2) Install Soda Spotify
3) Install these packages using NPM. These are needed for compiling the Vue Components in this package.
4) Integrate Soda Spotify into laravel by adding Soda\Spotify\Providers\SpotifyServiceProvider::class
in the providers array in /config/app.php
5) Run the database migrations php artisan migrate
to generate the necessary tables.
6) In the CMS, go to the Spotify > Settings tab and specify the Package and Action that each created playlist should use. You can also specify the Playlist Title and Playlist Image (optional) for a playlist created on a user account.
Usage
Saving a Playlist
Include this file to create a link that will create a playlist on a users account.
Or, you can pass in custom text/views/html to be displayed.
You can specify the Title and Image the created playlist will have by going to the Spotify > Settings tab and in the cms and editing the Playlist Title and Playlist Image (optional).
This action will send them to Spotify and log them in. They will be sent back to the /playlist/ID page with
present.
If this parameter is present AND the playlist has not already been listed as added (session), then it will add the playlist to the users account before sending them back to the playlist on the site.
Tracks
You need to include the Tracks component in your Javascript using Vue. e.g.
Displaying the Player Interface
Or, you can pass in custom text act act as a title. e.g.
Routes
Save Playlist
Get Playlist Tracks
Response
Storing Track Data
Tracks need to be stored in the database in the JSON with the structure:
There is a function to convert an array of Spotify Created tracks JSON to this format
Creating a Playlist
$seeds is an array of seeds as defined in https://developer.spotify.com/web-api/get-recommendations/.
e.g.
Important: You MUST have any one of seed_genres, seed_tracks or seed_artists.
All versions of spotify with dependencies
soda-framework/cms Version >=0.7
laravel/framework Version ~5.3
ext-curl Version *
doctrine/dbal Version ^2.5