Aller au contenu

omnisong/odesli Référence de l’API

Étage
Fournisseur · Omnisong
Version
1.x
Suite de conformité
non branchée
Vérifié en réel
Son README ne le dit pas
Licence
MIT
composer require omnisong/odesli:1.x-dev

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é.

Omnisong\Odesli

  • OdesliCatalog class

    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).

    5 methods · 1 constant

  • OdesliCatalogFactory class

    Odesli (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(): string
public function links(Reference $reference): PlatformLinks

OdesliCatalog::release()

public function release(Reference $reference): ?Release

OdesliCatalog::releases()

public function releases(string $artist, int $limit = 50, ?string $country = null): array

OdesliCatalogFactory 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

OptionDefault
api_keynull
countrynull
base_uriOdesliCatalog::BASE_URI