stephan-strate/php-music-brainz-api

PHP wrapper for MusicBrainz api. Supports object-oriented access using repositories and factories.

v0.0.2-alpha 2022-08-06 10:51 UTC

README

MusicBrainz

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 😊