Skip to content

mandisma/spotify-api-client

Repository files navigation

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.

About

Http Client for the Spotify API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages