stephan-strate / php-music-brainz-api
PHP wrapper for MusicBrainz api. Supports object-oriented access using repositories and factories.
Fund package maintenance!
stephan-strate
Requires
- php: ^7.4 || ^8.0
- ext-gd: *
- ext-json: *
- doctrine/annotations: ^1.11
- php-http/client-common: ^2.3
- php-http/client-implementation: ^1.0
- php-http/discovery: ^1.10
- php-http/httplug: ^2.2
- symfony/property-access: ^5.2
- symfony/serializer: ^5.2
Requires (Dev)
- guzzlehttp/guzzle: ^7.2
- guzzlehttp/psr7: ^1.2 || ^2.0
- http-interop/http-factory-guzzle: ^1.0
- php-http/mock-client: ^1.4.1
- phpstan/phpstan: ^0.12.75 || ^1.0.0
- phpunit/phpunit: ^9.3
This package is auto-updated.
Last update: 2024-10-05 07:33:24 UTC
README
MusicBrainz API Wrapper
MusicBrainz is an open music encyclopedia that collects music metadata and makes it available to the public.
Recommended to use together with stephan-strate/php-cover-art-archive-api.
Inspired by php-github-api and php-tmdb.
Installation
Using composer:
$ composer require stephan-strate/php-music-brainz-api php-http/guzzle7-adapter:^1.0 http-interop/http-factory-guzzle:^1.0
Why php-http/guzzle7-adapter:^1.0
? This library is decoupled from any http client using HTTPlug.
Usage
First you want to create the client:
$client = new \MusicBrainz\Client('MyApplication', '1.1.0', 'contact@example.com');
Using this client, you can retrieve all other objects/apis.
Repository
Api
The api implementatioon returns the raw json response of the endpoint. You might want to use the repository implementation instead to get the parsed objects.
$release = $client->release();
Contributing
Help & Donate
I am very curious about projects that use my libraries. Please drop me a short message about what you use the library for. You can find my contact information on my profile (LinkedIn, E-mail).
If this project saved you time and money or you just appreciate what I am doing, please consider sponsoring me 😊