PHP code example of tnapf / spotify
1. Go to this page and download the library: Download tnapf/spotify library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tnapf / spotify example snippets
use Tnapf\Spotify\Client;
use Psr\Http\Client\ClientInterface;
$httpClient = ClientInterface::class; // <- must be a client interface implementation
$spotify = new Client($httpClient, $clientId, $clientSecret);
/** @var Album */
$spotify->albums->get('0rGKEhiSyEwmcpQoU5Gg61');