Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 1.61 KB

README.md

File metadata and controls

49 lines (30 loc) · 1.61 KB

SpotifyApiClient

Latest Version on Packagist GitHub Tests Action Status Total Downloads

PHP Wrapper for the Spotify Api.

The library follow the structure from the Spotify Web Api Reference : https://developer.spotify.com/documentation/web-api/reference/#/

Installation

You can install the package via composer:

composer require mandisma/spotify-api-client

Usage

The OAuth2 authentication is not provided by this library. You have to do it or your own or use an existing library.

Then you have to create a class which implements the AuthorizationInterface before you can start. This interface is needed to initialize the client.

Initialize the client :

$clientBuilder = new \Mandisma\SpotifyApiClient\ClientBuilder();

$client = $clientBuilder->build(/*AuthorizationInterface*/ $authorization);

$playedTracks = $client->playerApi->getRecentlyPlayedTracks();

Testing

composer test

Credits

License

The MIT License (MIT). Please see License File for more information.