tnapf/spotify

A Spotify API Wrapper

v0.1.0-alpha 2023-05-24 17:41 UTC

This package is auto-updated.

Last update: 2024-11-24 12:38:48 UTC


README

A proper Spotify API client for PHP (still in development)

Installation

composer require tnapf/spotify

Usage

Creating a new Spotify object

use Tnapf\Spotify\Client;
use Psr\Http\Client\ClientInterface;

$httpClient = ClientInterface::class; // <- must be a client interface implementation

$spotify = new Client($httpClient, $clientId, $clientSecret);

Making requests

/** @var Album */
$spotify->albums->get('0rGKEhiSyEwmcpQoU5Gg61');

Since everything will eventually be mapped you'll get autocomplete from your IDE so you don't have to look up the documentation all the time.