2017 © Pedro Peláez
 

library spotify-web-api

PHP library for the Spotify Web API

image

audeio/spotify-web-api

PHP library for the Spotify Web API

  • Saturday, September 23, 2017
  • by jonjomckay
  • Repository
  • 5 Watchers
  • 37 Stars
  • 505 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 9 Forks
  • 2 Open issues
  • 5 Versions
  • 6 % Grown

The README.md

Spotify Web API

Build Status, (*1)

Requirements

Installation

  1. Add "audeio/spotify-web-api": "0.*" to your composer.json
  2. Run composer update to update your application with the new dependency
  3. That's all!

Usage

  1. Instantiate a new instance of Audeio\Spotify\API and set the access token retrieved by your OAuth 2 client (a provider for league/oauth2-client is included under Audeio\Spotify\ Oauth2\Client\Provider\Spotify):, (*2)

    $api = new \Audeio\Spotify\API();
    $api->setAccessToken('BAWSDOJWEO984yt34y35YgdsnhlreGERH56u45htrH54y');
    
  2. Call all the methods you need!, (*3)

    $api->getAlbum('id');
    $api->getAlbums(array('id-1', 'id-2', 'id-3'));
    $api->getAlbumTracks('id');
    $api->getArtist('id');
    $api->getArtists(array('id-1', 'id-2', 'id-3'));
    $api->getArtistAlbums('id', 'country');
    $api->getArtistRelatedArtists('id');
    $api->getTrack('id');
    $api->getTracks(array('id-1', 'id-2', 'id-3'));
    $api->getUserProfile('id');
    $api->getCurrentUser();
    $api->getUserPlaylist('userId', 'id');
    $api->getUserPlaylistTracks('userId', 'id');
    $api->getUserPlaylists('id');
    

License

The MIT License; please see LICENSE for more information., (*4)

The Versions