PHP code example of canardev / music-links

1. Go to this page and download the library: Download canardev/music-links 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/ */

    

canardev / music-links example snippets


use Canardev\MusicLinks\Api;

$api = new Api();
$api->getArtistOrTrackLinks($artistOrTrackSpotifyURL, $CountryCode);

$artistOrTrackSpotifyURL = 'https://open.spotify.com/artist/4gzpq5DPGxSnKTe4SA8HAU?si=1e2e2e2e2e2e2e2e';
$CountryCode = 'US';
bash
 php vendor/bin/phpstan analyse src --level=8
bash
php vendor/bin/php-cs-fixer fix src --rules=@PSR12
bash
php vendor/bin/phpunit tests