Lue dans les fichiers PHP du paquet au commit 04c7181c01a8 : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.
OdesliCatalogclasssong.link's API (v1-alpha.1): given a URL on any platform, or a platform's own id, the same song or album everywhere else. It knows where a recording is, not what is on it: no tracks, no previews, no list of an artist's releases - and it reads neither a UPC nor an ISRC (the aggregator comes back with the id another catalogue found).
5 methods · 1 constant
OdesliCatalogFactoryclassOdesli (song.link): one link to the same song or album on every platform.
3 options
Omnisong\Odesli
OdesliCatalog class
final class OdesliCatalog implements CatalogInterface OdesliCatalog.php:26
song.link's API (v1-alpha.1): given a URL on any platform, or a platform's own id, the same song or album everywhere else. It knows where a recording is, not what is on it: no tracks, no previews, no list of an artist's releases - and it reads neither a UPC nor an ISRC (the aggregator comes back with the id another catalogue found).
const BASE_URI = 'https://api.song.link/v1-alpha.1/'
OdesliCatalog::__construct()
public function __construct(readonly HttpClientInterface $http, readonly ?string $apiKey = null, readonly ?string $country = null, readonly string $baseUri = self::BASE_URI)OdesliCatalog::getName()
public function getName(): stringOdesliCatalog::links()
public function links(Reference $reference): PlatformLinksOdesliCatalog::release()
public function release(Reference $reference): ?ReleaseOdesliCatalog::releases()
public function releases(string $artist, int $limit = 50, ?string $country = null): arrayOdesliCatalogFactory class
final class OdesliCatalogFactory extends CatalogFactory OdesliCatalogFactory.php:18
Odesli (song.link): one link to the same song or album on every platform.
options: api_key: '%env(default::ODESLI_API_KEY)%' # from developers@song.link; without one the API answers 401 since the public access was withdrawn country: 'DE' # userCountry: the store the links point at (default: Odesli's, US) base_uri: 'https://api.song.link/v1-alpha.1/'
Options
| Option | Default | |
|---|---|---|
api_key | null | |
country | null | |
base_uri | OdesliCatalog::BASE_URI |