tnapf / spotify
A Spotify API Wrapper
v0.1.0-alpha
2023-05-24 17:41 UTC
Requires
- php: >=8.1
- guzzlehttp/guzzle: ^7.7
- httpsoft/http-server-request: ^1.1.0
- psr/http-client: ^1.0
- tnapf/jsonmapper: ^v1.0.0
Requires (Dev)
- ergebnis/composer-normalize: ^2.31
- fakerphp/faker: ^1.21
- friendsofphp/php-cs-fixer: ^3.16
- jetbrains/phpstorm-attributes: ^1.0
- phpunit/phpunit: ^10.1
- roave/security-advisories: dev-latest
- tnapf/env: ^1.0
- xheaven/composer-git-hooks: ^3.0
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.