Download the PHP package aerni/laravel-spotify without Composer

On this page you can find all versions of the php package aerni/laravel-spotify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-spotify


Spotify for Laravel

An easy to use Spotify Web API wrapper for Laravel 11

Packagist version Packagist total downloads GitHub license PayPal donate

Installation • Usage Example • Optional Parameters • Spotify API Reference • Recommendations

Introduction

Spotify for Laravel makes working with the Spotify Web API a breeze. It provides straight forward methods for each endpoint and a fluent interface for optional parameters.

The package supports all Spotify Web API endpoints that are accessible with the Client Credentials Flow.

Installation

Install the package using Composer. The package will automatically register itself.

Publish the config of the package.

The following config will be published to config/spotify.php.

Set the Client ID and Client Secret of your Spotify App in your .env file.

Usage Example

Import the package at the top of your file. All of the following examples use the Facade.

Search for tracks with the name Closed on Sunday.

Important: The get() method acts as the final method of the fluent interface. Make sure to always call it last in the method chain to execute a request to the Spotify Web API.

Optional Parameters

You may pass optional parameters to your requests using the fluent interface provided by this package. A common use case is to set a limit and offset to your request.

Parameter Methods API Reference

Consult the Spotify Web API Reference Documentation to check which parameters are available to what endpoint.

Resetting Defaults

You may want to reset the default setting of country, locale or market for a given request. You may do so by calling the corresponding parameter method with an empty argument.

Response Key

Some API responses are wrapped in a top level object like artists or tracks. If you want to directly access the content of a given top level object, you may do so by passing its key as a string to the get() method.

Spotify API Reference

Note: Any parameter that accepts multiple values can either receive a string with comma-separated values or an array of values.

Albums

Spotify Web API Reference on Albums

Artists

Spotify Web API Reference on Artists

Browse

Spotify Web API Reference on Browse

Episodes

Spotify Web API Reference on Episodes

Playlists

Spotify Web API Reference on Playlists

Search

Spotify Web API Reference on Search

Shows

Spotify Web API Reference on Shows

Tracks

Spotify Web API Reference on Tracks

User's Profile

Spotify Web API Reference on User's Profile

Recommendations

You can get personalized tracks using the recommendations endpoint by seeding artists, genres and tracks along with a bunch of adjustable properties such as energy, key and danceability.

Usage Example

Import the SpotifySeed class. All of the following examples use the Facade.

Build your personalized $seed. You may chain as many methods as you want.

Get your personalized tracks by passing the $seed to the recommendations() method.

SpotifySeed API Reference

Note: Any parameter that accepts multiple values can either receive a string with comma-separated values or an array of values.

Add artists, genres and tracks to your seed:

Add tunable properties to your seed:

Tests

Run the tests like this:


All versions of laravel-spotify with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.0
illuminate/support Version ^11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package aerni/laravel-spotify contains the following files

Loading the files please wait ....